Increment Py_None refcount for NULL array elements
Per bug #5835 by Julien Demoor Author: Alex Hunsaker
This commit is contained in:
parent
08af45f4ff
commit
978445bece
@ -2043,7 +2043,10 @@ PLyList_FromArray(PLyDatumToOb *arg, Datum d)
|
|||||||
elm->typlen, elm->typbyval, elm->typalign,
|
elm->typlen, elm->typbyval, elm->typalign,
|
||||||
&isnull);
|
&isnull);
|
||||||
if (isnull)
|
if (isnull)
|
||||||
|
{
|
||||||
|
Py_INCREF(Py_None);
|
||||||
PyList_SET_ITEM(list, i, Py_None);
|
PyList_SET_ITEM(list, i, Py_None);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
PyList_SET_ITEM(list, i, elm->func(elm, elem));
|
PyList_SET_ITEM(list, i, elm->func(elm, elem));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user