Commit 978445be authored by Alvaro Herrera's avatar Alvaro Herrera

Increment Py_None refcount for NULL array elements

Per bug #5835 by Julien Demoor
Author: Alex Hunsaker
parent 08af45f4
......@@ -2043,7 +2043,10 @@ PLyList_FromArray(PLyDatumToOb *arg, Datum d)
elm->typlen, elm->typbyval, elm->typalign,
&isnull);
if (isnull)
{
Py_INCREF(Py_None);
PyList_SET_ITEM(list, i, Py_None);
}
else
PyList_SET_ITEM(list, i, elm->func(elm, elem));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment