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
0db6c709
Commit
0db6c709
authored
Jul 26, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't reload inline module if it's already loaded.
parent
ab740487
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
46 deletions
+51
-46
Cython/Build/Inline.py
Cython/Build/Inline.py
+51
-46
No files found.
Cython/Build/Inline.py
View file @
0db6c709
...
@@ -147,6 +147,10 @@ def cython_inline(code,
...
@@ -147,6 +147,10 @@ def cython_inline(code,
key
=
orig_code
,
arg_sigs
,
sys
.
version_info
,
sys
.
executable
,
Cython
.
__version__
key
=
orig_code
,
arg_sigs
,
sys
.
version_info
,
sys
.
executable
,
Cython
.
__version__
module_name
=
"_cython_inline_"
+
hashlib
.
md5
(
str
(
key
).
encode
(
'utf-8'
)).
hexdigest
()
module_name
=
"_cython_inline_"
+
hashlib
.
md5
(
str
(
key
).
encode
(
'utf-8'
)).
hexdigest
()
if
module_name
in
sys
.
modules
:
module
=
sys
.
modules
[
module_name
]
else
:
build_extension
=
None
build_extension
=
None
if
cython_inline
.
so_ext
is
None
:
if
cython_inline
.
so_ext
is
None
:
# Figure out and cache current extension suffix
# Figure out and cache current extension suffix
...
@@ -199,6 +203,7 @@ def __invoke(%(params)s):
...
@@ -199,6 +203,7 @@ def __invoke(%(params)s):
build_extension.run()
build_extension.run()
module = imp.load_dynamic(module_name, module_path)
module = imp.load_dynamic(module_name, module_path)
arg_list = [kwds[arg] for arg in arg_names]
arg_list = [kwds[arg] for arg in arg_names]
return module.__invoke(*arg_list)
return module.__invoke(*arg_list)
...
...
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