Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
56b25a9c
Commit
56b25a9c
authored
Dec 04, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tab fix
parent
3285325f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
Cython/Compiler/Builtin.py
Cython/Compiler/Builtin.py
+24
-24
No files found.
Cython/Compiler/Builtin.py
View file @
56b25a9c
...
@@ -114,7 +114,7 @@ static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) {
...
@@ -114,7 +114,7 @@ static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) {
if (PyDict_GetItemString(globals, "__builtins__") == NULL) {
if (PyDict_GetItemString(globals, "__builtins__") == NULL) {
PyDict_SetItemString(globals, "__builtins__", PyEval_GetBuiltins());
PyDict_SetItemString(globals, "__builtins__", PyEval_GetBuiltins());
}
}
if (PyCode_Check(o)) {
if (PyCode_Check(o)) {
...
@@ -124,36 +124,36 @@ static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) {
...
@@ -124,36 +124,36 @@ static PyObject* __Pyx_PyRun(PyObject* o, PyObject* globals, PyObject* locals) {
goto bad;
goto bad;
}
}
#if PY_VERSION_HEX < 0x030200A4
#if PY_VERSION_HEX < 0x030200A4
result = PyEval_EvalCode((PyCodeObject *)o, globals, locals);
result = PyEval_EvalCode((PyCodeObject *)o, globals, locals);
#else
#else
result = PyEval_EvalCode(o, globals, locals);
result = PyEval_EvalCode(o, globals, locals);
#endif
#endif
} else {
} else {
PyCompilerFlags cf;
PyCompilerFlags cf;
cf.cf_flags = 0;
cf.cf_flags = 0;
if (PyUnicode_Check(o)) {
if (PyUnicode_Check(o)) {
cf.cf_flags = PyCF_SOURCE_IS_UTF8;
cf.cf_flags = PyCF_SOURCE_IS_UTF8;
s = PyUnicode_AsUTF8String(o);
s = PyUnicode_AsUTF8String(o);
if (!s) goto bad;
if (!s) goto bad;
o = s;
o = s;
#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
} else if (!PyBytes_Check(o)) {
} else if (!PyBytes_Check(o)) {
#else
#else
} else if (!PyString_Check(o)) {
} else if (!PyString_Check(o)) {
#endif
#endif
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"exec: arg 1 must be string, bytes or code object");
"exec: arg 1 must be string, bytes or code object");
goto bad;
goto bad;
}
}
#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
code = PyBytes_AS_STRING(o);
code = PyBytes_AS_STRING(o);
#else
#else
code = PyString_AS_STRING(o);
code = PyString_AS_STRING(o);
#endif
#endif
if (PyEval_MergeCompilerFlags(&cf)) {
if (PyEval_MergeCompilerFlags(&cf)) {
result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf);
result = PyRun_StringFlags(code, Py_file_input, globals, locals, &cf);
} else {
} else {
result = PyRun_String(code, Py_file_input, globals, locals);
result = PyRun_String(code, Py_file_input, globals, locals);
}
}
Py_XDECREF(s);
Py_XDECREF(s);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment