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
7f649135
Commit
7f649135
authored
Jan 05, 2018
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract some generated plain code into a utility code file to make it more visible and editable.
parent
1c85a781
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+2
-9
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+14
-0
No files found.
Cython/Compiler/ModuleNode.py
View file @
7f649135
...
...
@@ -2312,15 +2312,8 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
tempdecl_code
.
put_trace_declarations
()
code
.
put_trace_frame_init
()
code
.
putln
(
"#if CYTHON_REFNANNY"
)
code
.
putln
(
"__Pyx_RefNanny = __Pyx_RefNannyImportAPI(
\
"
refnanny
\
"
);"
)
code
.
putln
(
"if (!__Pyx_RefNanny) {"
)
code
.
putln
(
" PyErr_Clear();"
)
code
.
putln
(
" __Pyx_RefNanny = __Pyx_RefNannyImportAPI(
\
"
Cython.Runtime.refnanny
\
"
);"
)
code
.
putln
(
" if (!__Pyx_RefNanny)"
)
code
.
putln
(
" Py_FatalError(
\
"
failed to import 'refnanny' module
\
"
);"
)
code
.
putln
(
"}"
)
code
.
putln
(
"#endif"
)
refnanny_import_code
=
UtilityCode
.
load_as_string
(
"ImportRefnannyAPI"
,
"ModuleSetupCode.c"
)[
1
]
code
.
putln
(
refnanny_import_code
.
rstrip
())
code
.
put_setup_refcount_context
(
header3
)
env
.
use_utility_code
(
UtilityCode
.
load
(
"CheckBinaryVersion"
,
"ModuleSetupCode.c"
))
...
...
Cython/Utility/ModuleSetupCode.c
View file @
7f649135
...
...
@@ -1100,6 +1100,20 @@ end:
}
#endif
/* CYTHON_REFNANNY */
/////////////// ImportRefnannyAPI ///////////////
#if CYTHON_REFNANNY
__Pyx_RefNanny
=
__Pyx_RefNannyImportAPI
(
"refnanny"
);
if
(
!
__Pyx_RefNanny
)
{
PyErr_Clear
();
__Pyx_RefNanny
=
__Pyx_RefNannyImportAPI
(
"Cython.Runtime.refnanny"
);
if
(
!
__Pyx_RefNanny
)
Py_FatalError
(
"failed to import 'refnanny' module"
);
}
#endif
/////////////// RegisterModuleCleanup.proto ///////////////
//@substitute: naming
...
...
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