Commit 05cde011 authored by Robert Bradshaw's avatar Robert Bradshaw

Trivial cfunc -> py conversion.

parent 6b21b89a
......@@ -2641,6 +2641,17 @@ class CFuncType(CType):
assert not self.is_fused
specialize_entry(entry, cname)
def create_to_py_utility_code(self, env):
import re
from .UtilityCode import CythonUtilityCode
safe_typename = re.sub('[^a-zA-Z0-9]', '__', self.declaration_code(""))
self.to_py_function = "__Pyx_CFunc_%s_to_py" % safe_typename
context = {
'cname': self.to_py_function,
}
env.use_utility_code(CythonUtilityCode.load("cfunc.to_py", "CFuncConvert.pyx", context=context))
return True
def specialize_entry(entry, cname):
"""
......
......@@ -303,7 +303,7 @@ class Scope(object):
self.name = name
self.outer_scope = outer_scope
self.parent_scope = parent_scope
mangled_name = "%d%s_" % (len(name), name)
mangled_name = "%d%s_" % (len(name), name.replace('.', '_dot_'))
qual_scope = self.qualifying_scope()
if qual_scope:
self.qualified_name = qual_scope.qualify_name(name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment