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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
ae229b17
Commit
ae229b17
authored
May 12, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merged in latest cython-devel
parents
4915f2ad
e118e549
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+14
-4
No files found.
Cython/Compiler/ModuleNode.py
View file @
ae229b17
...
@@ -2450,6 +2450,9 @@ static int %(IMPORT_STAR)s(PyObject* m) {
...
@@ -2450,6 +2450,9 @@ static int %(IMPORT_STAR)s(PyObject* m) {
char* s;
char* s;
PyObject *locals = 0;
PyObject *locals = 0;
PyObject *list = 0;
PyObject *list = 0;
#if PY_MAJOR_VERSION >= 3
PyObject *utf8_name = 0;
#endif
PyObject *name;
PyObject *name;
PyObject *item;
PyObject *item;
...
@@ -2460,19 +2463,26 @@ static int %(IMPORT_STAR)s(PyObject* m) {
...
@@ -2460,19 +2463,26 @@ static int %(IMPORT_STAR)s(PyObject* m) {
for(i=0; i<PyList_GET_SIZE(list); i++) {
for(i=0; i<PyList_GET_SIZE(list); i++) {
name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
#if PY_MAJOR_VERSION < 3
#if PY_MAJOR_VERSION >= 3
s = PyString_AsString(name);
utf8_name = PyUnicode_AsUTF8String(name);
if (!utf8_name) goto bad;
s = PyBytes_AS_STRING(utf8_name);
if (%(IMPORT_STAR_SET)s(item, name, s) < 0) goto bad;
Py_DECREF(utf8_name); utf8_name = 0;
#else
#else
s = PyUnicode_AsString(name);
s = PyString_AsString(name);
#endif
if (!s) goto bad;
if (!s) goto bad;
if (%(IMPORT_STAR_SET)s(item, name, s) < 0) goto bad;
if (%(IMPORT_STAR_SET)s(item, name, s) < 0) goto bad;
#endif
}
}
ret = 0;
ret = 0;
bad:
bad:
Py_XDECREF(locals);
Py_XDECREF(locals);
Py_XDECREF(list);
Py_XDECREF(list);
#if PY_MAJOR_VERSION >= 3
Py_XDECREF(utf8_name);
#endif
return ret;
return ret;
}
}
"""
%
{
'IMPORT_STAR'
:
Naming
.
import_star
,
"""
%
{
'IMPORT_STAR'
:
Naming
.
import_star
,
...
...
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