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
a390543f
Commit
a390543f
authored
Dec 16, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make sure utility code loaded for header files and module preamble gets properly formatted
parent
fc4a97a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+7
-7
No files found.
Cython/Compiler/ModuleNode.py
View file @
a390543f
...
...
@@ -241,14 +241,14 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
cname
=
env
.
mangle
(
Naming
.
varptr_prefix
,
entry
.
name
)
h_code
.
putln
(
"static %s = 0;"
%
type
.
declaration_code
(
cname
))
h_code
.
putln
(
"#define %s (*%s)"
%
(
entry
.
name
,
cname
))
h_code
.
put
(
UtilityCode
.
load_
cached
(
"PyIdentifierFromString"
,
"ImportExport.c"
).
proto
)
h_code
.
put
(
UtilityCode
.
load_
cached
(
"ModuleImport"
,
"ImportExport.c"
).
impl
)
h_code
.
put
(
UtilityCode
.
load_
as_string
(
"PyIdentifierFromString"
,
"ImportExport.c"
)[
0
]
)
h_code
.
put
(
UtilityCode
.
load_
as_string
(
"ModuleImport"
,
"ImportExport.c"
)[
1
]
)
if
api_vars
:
h_code
.
put
(
UtilityCode
.
load_
cached
(
"VoidPtrImport"
,
"ImportExport.c"
).
impl
)
h_code
.
put
(
UtilityCode
.
load_
as_string
(
"VoidPtrImport"
,
"ImportExport.c"
)[
1
]
)
if
api_funcs
:
h_code
.
put
(
UtilityCode
.
load_
cached
(
"FunctionImport"
,
"ImportExport.c"
).
impl
)
h_code
.
put
(
UtilityCode
.
load_
as_string
(
"FunctionImport"
,
"ImportExport.c"
)[
1
]
)
if
api_extension_types
:
h_code
.
put
(
UtilityCode
.
load_
cached
(
"TypeImport"
,
"ImportExport.c"
).
impl
)
h_code
.
put
(
UtilityCode
.
load_
as_string
(
"TypeImport"
,
"ImportExport.c"
)[
1
]
)
h_code
.
putln
(
""
)
h_code
.
putln
(
"static int import_%s(void) {"
%
self
.
api_name
(
env
))
h_code
.
putln
(
"PyObject *module = 0;"
)
...
...
@@ -555,8 +555,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
code
.
putln
(
"#define CYTHON_CCOMPLEX 1"
)
code
.
putln
(
"#endif"
)
code
.
putln
(
""
)
code
.
put
(
UtilityCode
.
load_
cached
(
"UtilityFunctionPredeclarations"
,
"ModuleSetupCode.c"
).
proto
)
code
.
put
(
UtilityCode
.
load_
cached
(
"TypeConversions"
,
"TypeConversion.c"
).
proto
)
code
.
put
(
UtilityCode
.
load_
as_string
(
"UtilityFunctionPredeclarations"
,
"ModuleSetupCode.c"
)[
0
]
)
code
.
put
(
UtilityCode
.
load_
as_string
(
"TypeConversions"
,
"TypeConversion.c"
)[
0
]
)
code
.
put
(
Nodes
.
branch_prediction_macros
)
code
.
putln
(
''
)
code
.
putln
(
'static PyObject *%s;'
%
env
.
module_cname
)
...
...
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