Francesc Altet wrote:
> A Dissabte 12 Agost 2006 14:37, Todd Miller va escriure:
>   
>> I agree with all of Travis' comments below and committed the suggested
>> changes to numarray CVS.     I found one other numarray change needed
>> for Francesc's examples to run (apparently) leak-free:
>>
>> Py_INCREF(obj)
>> Py_XDECREF(a->base)
>> a->base = obj
>> Py_DECREF(cobj)
>>
>> Thanks Travis!
>>     
>
> Hey! I checked this morning Travis' patch and seems to work well for me. I'll 
> add yours as well later on and see... BTW, where exactly I've to add the 
> above lines?
>   
The lines above are a modification to Travis' patch,  so basically the 
same place:

*******
        a = NA_FromDimsStridesTypeAndData(arrayif->nd, shape, strides, 
t, arrayif->data);
        if (!a) goto _fail;

!       a->base = cobj;

        return a;

-------
        a = NA_FromDimsStridesTypeAndData(arrayif->nd, shape, strides, 
t, arrayif->data);
        if (!a) goto _fail;

!       Py_INCREF(obj);
!       Py_XDECREF(a->base);
!       a->base = obj;
!       Py_DECREF(cobj);

        return a;

Todd

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to