Commit da1670bc authored by Lisandro Dalcin's avatar Lisandro Dalcin

Py2.3 and eval.h: include C header in proto section of pyexec_utility_code

parent 27353fda
...@@ -163,21 +163,21 @@ bad: ...@@ -163,21 +163,21 @@ bad:
pyexec_utility_code = UtilityCode( pyexec_utility_code = UtilityCode(
proto = """ proto = """
static PyObject* __Pyx_PyRun(PyObject*, PyObject*, PyObject*);
""",
impl = '''
#if PY_VERSION_HEX < 0x02040000 #if PY_VERSION_HEX < 0x02040000
#ifndef Py_EVAL_H #ifndef Py_EVAL_H
#include "eval.h" #include "eval.h"
#endif #endif
#endif #endif
static PyObject* __Pyx_PyRun(PyObject*, PyObject*, PyObject*);
""",
impl = """
static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) { static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) {
PyObject* result; PyObject* result;
PyObject* s = 0; PyObject* s = 0;
char *code = 0; char *code = 0;
if (!globals || globals == Py_None) { if (!globals || globals == Py_None) {
globals = PyModule_GetDict(%s);''' % Naming.module_cname + ''' globals = PyModule_GetDict(%s);""" % Naming.module_cname + """
if (!globals) if (!globals)
goto bad; goto bad;
} else if (!PyDict_Check(globals)) { } else if (!PyDict_Check(globals)) {
...@@ -236,7 +236,7 @@ bad: ...@@ -236,7 +236,7 @@ bad:
Py_XDECREF(s); Py_XDECREF(s);
return 0; return 0;
} }
''') """)
intern_utility_code = UtilityCode( intern_utility_code = UtilityCode(
proto = """ proto = """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment