Fix get intrinsic

This commit is contained in:
Siu Kwan Lam 2012-08-15 16:09:08 -07:00
commit 7880cdd3ba
2 changed files with 4 additions and 4 deletions

View file

@ -1054,7 +1054,7 @@ _w ## func (PyObject *self, PyObject *args) \
{ \
PyObject *obj1, *obj2; \
intype1 arg1; \
intype2 *arg2v; \
intype2 *arg2v = NULL; \
unsigned arg2n; \
int arg3; \
outtype ret; \
@ -1064,7 +1064,7 @@ _w ## func (PyObject *self, PyObject *args) \
\
arg1 = ( intype1 ) PyCapsule_GetPointer(obj1, NULL); \
arg2n = (unsigned) PyList_Size(obj2); \
if (!(arg2v = ( intype2 *)make_array_from_list(obj2, arg2n)))\
if (arg2n && !(arg2v = ( intype2 *)make_array_from_list(obj2, arg2n)))\
return PyErr_NoMemory(); \
\
ret = func (arg1, arg2v, arg2n, arg3); \