Extend attribute and item accessor interface using object_api
diff --git a/tests/constructor_stats.h b/tests/constructor_stats.h
index 69e385e..5dd215f 100644
--- a/tests/constructor_stats.h
+++ b/tests/constructor_stats.h
@@ -103,7 +103,7 @@
int alive() {
// Force garbage collection to ensure any pending destructors are invoked:
- py::module::import("gc").attr("collect").operator py::object()();
+ py::module::import("gc").attr("collect")();
int total = 0;
for (const auto &p : _instances) if (p.second > 0) total += p.second;
return total;