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

merge

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