projects
/
users
/
c2main
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
497e65f
)
Fix for warnings-free compilation with Python 3.2
author
Peter Eisentraut
<peter_e@gmx.net>
Wed, 16 Feb 2011 20:19:29 +0000
(22:19 +0200)
committer
Peter Eisentraut
<peter_e@gmx.net>
Wed, 16 Feb 2011 21:15:53 +0000
(23:15 +0200)
The first argument of PyEval_EvalCode() was changed from PyCodeObject*
to PyObject* because of PEP 384.
src/pl/plpython/plpython.c
patch
|
blob
|
blame
|
history
diff --git
a/src/pl/plpython/plpython.c
b/src/pl/plpython/plpython.c
index fff7de767435e1204f7c0c21339950999d9a131b..82baf940e31959bec4d017a725bd2f830e0f4825 100644
(file)
--- a/
src/pl/plpython/plpython.c
+++ b/
src/pl/plpython/plpython.c
@@
-1220,8
+1220,13
@@
PLy_procedure_call(PLyProcedure *proc, char *kargs, PyObject *vargs)
PyObject *rv;
PyDict_SetItemString(proc->globals, kargs, vargs);
+#if PY_VERSION_HEX >= 0x03020000
+ rv = PyEval_EvalCode(proc->code,
+ proc->globals, proc->globals);
+#else
rv = PyEval_EvalCode((PyCodeObject *) proc->code,
proc->globals, proc->globals);
+#endif
/* If the Python code returned an error, propagate it */
if (rv == NULL)