On May 2, 5:52 pm, Carl Banks <[email protected]> wrote:
> Not sure what you're doing here. It looks like you are being passed
> an object of a given type, then you get the type object, call it to
> create another object of that type, and assign it to object->instance.
Sorry, I should have noted that the "NautilusPythonObject" type in the
code is a struct defined as:
struct _NautilusPythonObject {
GObject parent_slot;
PyObject *instance;
};
> You are assigning the attirbute the the object that the C code refers
> to as "object->instance", but it seems that in the Python snippet you
> are calling getattr on the object that the C code refers to as
> "object".
object->instance is the PyObject, and I gathered that it was the
correct thing to assign to from the fact that the address is identical
as seen from C and Python.
— Jason
--
http://mail.python.org/mailman/listinfo/python-list