[Numpy-discussion] Fix to #789 maybe not right.

Travis E. Oliphant oliphant@enthought....
Wed May 21 22:24:30 CDT 2008


David Cournapeau wrote:
> Charles R Harris wrote:
>   
>> And I'm not sure self->desc needs its reference count decremented, 
>> PyArray_FromArray is one of those vicious, nasty functions with side 
>> effects and might decrement the count itself.
>>     
>
> might ? What do you mean by might decrement ? If the call to 
> PyAarray_FromArray fails, no reference are stolen, right ?
>   

No, that's not right.   The reference is stolen if it fails as well.   
This is true of all descriptor data-types.  Perhaps it is weird, but it 
was a lot easier to retro-fit Numeric PyArray_Descr as a Python object 
that way.

-Travis



More information about the Numpy-discussion mailing list