I've got class A wrapped with method foo implemented using %extend:
class A { ... %extend { void foo() { self->foo_impl(); } }
Now I want to increase ref count to an A inside foo_impl, but I only got A* (as self).
Question: how can I write/wrap function foo, so that I have an access both to A* and underlying PyObject*?
Thank you