mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-12-21 08:29:39 +08:00
Fix for warnings-free compilation with Python 3.2
The first argument of PyEval_EvalCode() was changed from PyCodeObject* to PyObject* because of PEP 384.
This commit is contained in:
parent
497e65f822
commit
66d6b4cb54
@ -1220,8 +1220,13 @@ PLy_procedure_call(PLyProcedure *proc, char *kargs, PyObject *vargs)
|
|||||||
PyObject *rv;
|
PyObject *rv;
|
||||||
|
|
||||||
PyDict_SetItemString(proc->globals, kargs, vargs);
|
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,
|
rv = PyEval_EvalCode((PyCodeObject *) proc->code,
|
||||||
proc->globals, proc->globals);
|
proc->globals, proc->globals);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If the Python code returned an error, propagate it */
|
/* If the Python code returned an error, propagate it */
|
||||||
if (rv == NULL)
|
if (rv == NULL)
|
||||||
|
Loading…
Reference in New Issue
Block a user