Re: [Numpy-discussion] Missing NULL return checks?

2008-07-12 Thread Michael Abbott
PyArray_DescrFromType can return NULL Yah, you noticed ;) Yet it is unchecked in several places: Pity about that. Easy enough to fix though -- just don't lose track of ref counts. In fact, I've already submitted a patch to this function (but not addressing this issue). static int

Re: [Numpy-discussion] Missing NULL return checks?

2008-07-12 Thread Charles R Harris
On Sat, Jul 12, 2008 at 8:42 AM, Michael Abbott [EMAIL PROTECTED] wrote: PyArray_DescrFromType can return NULL Yah, you noticed ;) Yet it is unchecked in several places: Pity about that. Easy enough to fix though -- just don't lose track of ref counts. In fact, I've already submitted a

Re: [Numpy-discussion] Missing NULL return checks?

2008-07-12 Thread Charles R Harris
On Sat, Jul 12, 2008 at 10:13 AM, Charles R Harris [EMAIL PROTECTED] wrote: On Sat, Jul 12, 2008 at 8:42 AM, Michael Abbott [EMAIL PROTECTED] wrote: PyArray_DescrFromType can return NULL Yah, you noticed ;) Yet it is unchecked in several places: Pity about that. Easy enough to fix

[Numpy-discussion] Missing NULL return checks?

2008-07-11 Thread Charles R Harris
PyArray_DescrFromType can return NULL static PyArray_Descr * PyArray_DescrFromType(int type) { PyArray_Descr *ret = NULL; if (type PyArray_NTYPES) { ret = _builtin_descrs[type]; } else if (type == PyArray_NOTYPE) { /* * This needs to not raise an error