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
55309f78
Commit
55309f78
authored
May 29, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.29.x'
parents
7b0df9dd
22f62fe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+2
-5
No files found.
Cython/Compiler/Code.py
View file @
55309f78
...
...
@@ -543,7 +543,7 @@ class UtilityCode(UtilityCodeBase):
impl
=
re
.
sub
(
r'PY(IDENT|UNICODE)\
(
"([^"]+)"\
)
', externalise, impl)
assert '
PYIDENT
(
' not in impl and '
PYUNICODE
(
' not in impl
return
bool(replacements)
, impl
return
True
, impl
def inject_unbound_methods(self, impl, output):
"""Replace '
UNBOUND_METHOD
(
type
,
"name"
)
' by a constant Python identifier cname.
...
...
@@ -551,7 +551,6 @@ class UtilityCode(UtilityCodeBase):
if '
CALL_UNBOUND_METHOD
(
' not in impl:
return False, impl
utility_code = set()
def externalise(matchobj):
type_cname, method_name, obj_cname, args = matchobj.groups()
args = [arg.strip() for arg in args[1:].split('
,
')] if args else []
...
...
@@ -567,9 +566,7 @@ class UtilityCode(UtilityCodeBase):
r'
\
)
'
, externalise, impl)
assert 'CALL_UNBOUND_METHOD(' not in impl
for helper in sorted(utility_code):
output.use_utility_code(UtilityCode.load_cached(helper, "
ObjectHandling
.
c
"))
return bool(utility_code), impl
return True, impl
def wrap_c_strings(self, impl):
"""Replace CSTRING('''xyz''') by a C compatible string
...
...
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