OSDN Git Service
(root)
/
pg-rex
/
syncrep.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1435a85
)
Increment Py_None refcount for NULL array elements
author
Alvaro Herrera
<alvherre@alvh.no-ip.org>
Mon, 17 Jan 2011 16:01:04 +0000
(13:01 -0300)
committer
Alvaro Herrera
<alvherre@alvh.no-ip.org>
Mon, 17 Jan 2011 16:01:04 +0000
(13:01 -0300)
Per bug #5835 by Julien Demoor
Author: Alex Hunsaker
src/pl/plpython/plpython.c
patch
|
blob
|
history
diff --git
a/src/pl/plpython/plpython.c
b/src/pl/plpython/plpython.c
index
ea47067
..
1d5687f
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));
}