API/C memory mananegemnt problem

2006-03-10 Thread Marco Fumana
Thank for your help. I have try to follow your suggestion but I seem to fail. Now my C-module (call it C_Core) code is: *** /* create_list function */ int size=1000; output=(double *) calloc(size, sizeof(double)); py_output=PyList_New(0); for(i=0;

API/C memory mananegemnt problem

2006-03-10 Thread fumana
Hi everybody, I have a problem with Python/C API and memory management. I'm using Python 2.3.5 (#1, Jan 4 2006, 16:44:27) [GCC 4.0.2 20050901 (prerelease) (SUSE Linux)] on linux2 In my C-module I have a loop like this: *** int size=1000; output=