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
Kirill Smelkov
cython
Commits
8d817fc0
Commit
8d817fc0
authored
Apr 08, 2020
by
will-ca
Committed by
GitHub
Apr 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent generating code hash twice for `cython.inline()`. (GH-3495)
parent
34714637
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Cython/Build/Inline.py
Cython/Build/Inline.py
+4
-1
No files found.
Cython/Build/Inline.py
View file @
8d817fc0
...
...
@@ -160,6 +160,8 @@ def cython_inline(code, get_type=unsafe_type,
if
language_level
is
not
None
:
cython_compiler_directives
[
'language_level'
]
=
language_level
key_hash
=
None
# Fast path if this has been called in this session.
_unbound_symbols
=
_cython_inline_cache
.
get
(
code
)
if
_unbound_symbols
is
not
None
:
...
...
@@ -195,7 +197,8 @@ def cython_inline(code, get_type=unsafe_type,
del
kwds
[
name
]
arg_names
=
sorted
(
kwds
)
arg_sigs
=
tuple
([(
get_type
(
kwds
[
arg
],
ctx
),
arg
)
for
arg
in
arg_names
])
key_hash
=
_inline_key
(
orig_code
,
arg_sigs
,
language_level
)
if
key_hash
is
None
:
key_hash
=
_inline_key
(
orig_code
,
arg_sigs
,
language_level
)
module_name
=
"_cython_inline_"
+
key_hash
if
module_name
in
sys
.
modules
:
...
...
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