Re: dealloc function in python extend c module

2009-07-02 Thread Philip Semanchuk
On Jul 2, 2009, at 9:28 PM, Gabriel Genellina wrote: En Thu, 02 Jul 2009 14:22:53 -0300, Philip Semanchuk escribió: Hi Shen, I'm no expert on Python memory management, but since no once else has answered your question I'll tell you what I *think* is happening. Python doesn't delete objec

Re: dealloc function in python extend c module

2009-07-02 Thread Gabriel Genellina
En Thu, 02 Jul 2009 14:22:53 -0300, Philip Semanchuk escribió: On Jul 2, 2009, at 2:11 AM, Shen, Yu-Teh wrote: I create my extend type something like http://www.python.org/doc/current/extending/newtypes.html. And my type has a member which is a pointer point to my allocate memory ( no ref co

Re: dealloc function in python extend c module

2009-07-02 Thread Philip Semanchuk
On Jul 2, 2009, at 2:11 AM, Shen, Yu-Teh wrote: I create my extend type something like http://www.python.org/doc/current/extending/newtypes.html . And my type has a member which is a pointer point to my allocate memory ( no ref count). ex: --- ty

dealloc function in python extend c module

2009-07-01 Thread Shen, Yu-Teh
I create my extend type something like http://www.python.org/doc/current/extending/newtypes.html. And my type has a member which is a pointer point to my allocate memory ( no ref count). ex: --- typedef struct { PyObject_HEAD /* Type-specific

python extend c++ module

2009-06-30 Thread Shen, Yu-Teh
I have written a c++ extend module and I use distutils to build. setup.py from distutils.core import setup, Extension setup(name="noddy", version="1.0", ext_modules=[ Extension("noddy3", ["noddy3.cpp", "a.cpp"]) ]) I found it's quite strange when compilin

Re: python extend c++ module

2009-06-29 Thread Christian Heimes
找尋自己的一片天 schrieb: > I found it's quite strange when compiling. I didn't use extern "C" at all > , how can python get the right c++ funciton name without any compile error?? > > I found that it first use gcc to compile noddy3.cpp and then link by g++. > > Could anyone explain what

python extend c++ module

2009-06-29 Thread ���m�ۤv...@����
I have written a c++ extend module and I use distutils to build. setup.py from distutils.core import setup, Extension setup(name="noddy", version="1.0", ext_modules=[ Extension("noddy3", ["noddy3.cpp", "a.cpp"]) ]) I found it's quite strange when compilin