From: gideon may (gideon_at_[hidden])
Date: 2001-08-28 04:35:12


Hello,

2 questions:

1:I need to get to the wrapper object (PyObject*) which is generated
for a class within the member function. Is there an easy way
to get to this ?
IE given the hello example within the documentation, I would like
to access the PyObject * for hi withihn the invite function.
I know that I can achieve it with the following :
   std::string invite(const hello& w, PyObject * self) {
          return w.greet() + "! Please come soon!";
   }

>>> hi.invite(hi)

but is there a way where I don't have to pass the object as parameter?

2nd: When an object is deleted, would it be possible for the
destructor of the wrapper object to call an extra function ?
I have some c++ classes for which I allocate some extra data
and I need to clean this up when the object is deleted. I don't
have access to the class destructor directly.

Hope these questions are not too cryptic.

thanks,

gideon