Commit 3322ef01 authored by Robert Bradshaw's avatar Robert Bradshaw

merge

parents 35f7f3d7 da1670bc
......@@ -163,16 +163,21 @@ bad:
pyexec_utility_code = UtilityCode(
proto = """
#if PY_VERSION_HEX < 0x02040000
#ifndef Py_EVAL_H
#include "eval.h"
#endif
#endif
static PyObject* __Pyx_PyRun(PyObject*, PyObject*, PyObject*);
""",
impl = '''
impl = """
static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) {
PyObject* result;
PyObject* s = 0;
char *code = 0;
if (!globals || globals == Py_None) {
globals = PyModule_GetDict(%s);''' % Naming.module_cname + '''
globals = PyModule_GetDict(%s);""" % Naming.module_cname + """
if (!globals)
goto bad;
} else if (!PyDict_Check(globals)) {
......@@ -231,7 +236,7 @@ bad:
Py_XDECREF(s);
return 0;
}
''')
""")
intern_utility_code = UtilityCode(
proto = """
......
......@@ -748,12 +748,13 @@ class PyConstNode(AtomicNewTempExprNode):
# Abstract base class for constant Python values.
is_literal = 1
type = py_object_type
def is_simple(self):
return 1
def analyse_types(self, env):
self.type = py_object_type
pass
def calculate_result_code(self):
return self.value
......
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