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
ea5c0528
Commit
ea5c0528
authored
Jan 01, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
whitespace
parent
9a0a5c5d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+6
-5
No files found.
Cython/Compiler/ModuleNode.py
View file @
ea5c0528
...
@@ -1941,7 +1941,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1941,7 +1941,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
""
)
code
.
putln
(
""
)
code
.
putln
(
code
.
putln
(
"static struct PyGetSetDef %s[] = {"
%
"static struct PyGetSetDef %s[] = {"
%
env
.
getset_table_cname
)
env
.
getset_table_cname
)
for
entry
in
env
.
property_entries
:
for
entry
in
env
.
property_entries
:
if
entry
.
doc
:
if
entry
.
doc
:
doc_code
=
"%s"
%
code
.
get_string_const
(
entry
.
doc
)
doc_code
=
"%s"
%
code
.
get_string_const
(
entry
.
doc
)
...
@@ -1954,14 +1954,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1954,14 +1954,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
entry
.
setter_cname
or
"0"
,
entry
.
setter_cname
or
"0"
,
doc_code
))
doc_code
))
code
.
putln
(
code
.
putln
(
"{0, 0, 0, 0, 0}"
)
"{0, 0, 0, 0, 0}"
)
code
.
putln
(
code
.
putln
(
"};"
)
"};"
)
def
generate_import_star
(
self
,
env
,
code
):
def
generate_import_star
(
self
,
env
,
code
):
env
.
use_utility_code
(
streq_utility_code
)
env
.
use_utility_code
(
streq_utility_code
)
code
.
putln
()
code
.
putln
()
code
.
enter_cfunc_scope
()
# as we need labels
code
.
enter_cfunc_scope
()
# as we need labels
code
.
putln
(
"static int %s(PyObject *o, PyObject* py_name, char *name) {"
%
Naming
.
import_star_set
)
code
.
putln
(
"static int %s(PyObject *o, PyObject* py_name, char *name) {"
%
Naming
.
import_star_set
)
code
.
putln
(
"static const char* type_names[] = {"
)
code
.
putln
(
"static const char* type_names[] = {"
)
...
@@ -1981,7 +1981,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -1981,7 +1981,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
old_error_label
=
code
.
new_error_label
()
old_error_label
=
code
.
new_error_label
()
code
.
putln
(
"if (0);"
)
# so the first one can be "else if"
code
.
putln
(
"if (0);"
)
# so the first one can be "else if"
for
name
,
entry
in
env
.
entries
.
items
():
for
name
,
entry
in
env
.
entries
.
items
():
if
entry
.
is_cglobal
and
entry
.
used
:
if
entry
.
is_cglobal
and
entry
.
used
:
code
.
putln
(
'else if (__Pyx_StrEq(name, "%s")) {'
%
name
)
code
.
putln
(
'else if (__Pyx_StrEq(name, "%s")) {'
%
name
)
...
@@ -2005,7 +2005,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
...
@@ -2005,7 +2005,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
entry
.
type
.
error_condition
(
entry
.
cname
),
entry
.
type
.
error_condition
(
entry
.
cname
),
code
.
error_goto
(
entry
.
pos
)))
code
.
error_goto
(
entry
.
pos
)))
else
:
else
:
code
.
putln
(
'PyErr_Format(PyExc_TypeError, "Cannot convert Python object %s to %s");'
%
(
name
,
entry
.
type
))
code
.
putln
(
'PyErr_Format(PyExc_TypeError, "Cannot convert Python object %s to %s");'
%
(
name
,
entry
.
type
))
code
.
putln
(
code
.
error_goto
(
entry
.
pos
))
code
.
putln
(
code
.
error_goto
(
entry
.
pos
))
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
code
.
putln
(
"else {"
)
code
.
putln
(
"else {"
)
...
...
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