Skip to content

Commit 66d6b4c

Browse files
committed
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.
1 parent 497e65f commit 66d6b4c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/pl/plpython/plpython.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,8 +1220,13 @@ PLy_procedure_call(PLyProcedure *proc, char *kargs, PyObject *vargs)
12201220
PyObject *rv;
12211221

12221222
PyDict_SetItemString(proc->globals, kargs, vargs);
1223+
#if PY_VERSION_HEX >= 0x03020000
1224+
rv = PyEval_EvalCode(proc->code,
1225+
proc->globals, proc->globals);
1226+
#else
12231227
rv = PyEval_EvalCode((PyCodeObject *) proc->code,
12241228
proc->globals, proc->globals);
1229+
#endif
12251230

12261231
/* If the Python code returned an error, propagate it */
12271232
if (rv == NULL)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy