[C++-sig] Passing pointer to classes from C++ to Python

Jesús Gumbau Portalès jesuso20 at hotmail.com
Sat Jul 31 13:31:33 CEST 2004


I am using the PyObject_CallObject function to call a method on a python 
script and passing a pointer to a class object as a parameter. I pass the 
address of that object as:

PyInt_FromLong((long)&object);

as a parameter.

The problem is interpreting that address as a reference to a object from 
Python. (I am using SWIG so that python can know the class structure of the 
object).

_________________________________________________________________
Descarga gratis la Barra de Herramientas de MSN 
http://www.msn.es/usuario/busqueda/barra?XAPID=2031&DI=1055&SU=http%3A//www.hotmail.com&HL=LINKTAG1OPENINGTEXT_MSNBH




More information about the Cplusplus-sig mailing list