newbie question: python and c++ objects
Moshe Zadka
moshez at math.huji.ac.il
Sun Aug 6 02:52:30 EDT 2000
On Sat, 5 Aug 2000, Courageous wrote:
> Yes, albeit python uses C bindings. Therefore, what you'll have to
> do is offer C++ static class methods to the Python hooks inside
> your C-python interface.
That's not correct -- it's implementation dependant. The following
types are *not* equivalent, and cannot be casted safely from each other:
extern "C" {typedef void (*foo)(); }
typedef void (*foo)();
Hence, you *must not* use static methods where extern "C" funtion pointers
are expected. What you should do is wrap the functionaliy in extern "C"
functions which call into C++.
--
Moshe Zadka <moshez at math.huji.ac.il>
There is no IGLU cabal.
http://advogato.org/person/moshez
More information about the Python-list
mailing list