git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1435a85)
Increment Py_None refcount for NULL array elements
2011年1月17日 16:01:04 +0000 (13:01 -0300)
2011年1月17日 16:01:04 +0000 (13:01 -0300)
Per bug #5835 by Julien Demoor
Author: Alex Hunsaker


diff --git a/src/pl/plpython/plpython.c b/src/pl/plpython/plpython.c
index ea47067a85535bb8f20fc366a77cc2ec85c863a2..1d5687fba4723391ab8fa1012dca5f7f1aef37d7 100644 (file)
--- a/src/pl/plpython/plpython.c
+++ b/src/pl/plpython/plpython.c
@@ -2042,7 +2042,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));
}
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /