summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2020-05-29 20:40:27 +0200
committerStefan Behnel <stefan_ml@behnel.de>2020-05-29 20:40:27 +0200
commit55309f78f74c6395458d044f065668c6fe109766 (patch)
tree5175b4227666c7d24aaf06ff4568af425ac8f153
parent7b0df9ddb19707eed61af5202fa94e137de82211 (diff)
parent22f62fe1cc2702db9ca8a59199faf0de65f4e666 (diff)
downloadcython-55309f78f74c6395458d044f065668c6fe109766.tar.gz
Merge branch '0.29.x'
-rw-r--r--Cython/Compiler/Code.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/Cython/Compiler/Code.py b/Cython/Compiler/Code.py
index b0d133da4..f9d87951c 100644
--- a/Cython/Compiler/Code.py
+++ b/Cython/Compiler/Code.py
@@ -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