Commit ed84c09d authored by Robert Bradshaw's avatar Robert Bradshaw

Use type identifier in a couple more places.

parent 63c07e29
...@@ -380,7 +380,7 @@ class CTypedefType(BaseType): ...@@ -380,7 +380,7 @@ class CTypedefType(BaseType):
def _create_utility_code(self, template_utility_code, def _create_utility_code(self, template_utility_code,
template_function_name): template_function_name):
type_name = self.typedef_cname.replace(" ","_").replace("::","__") type_name = type_identifier(self.typedef_cname)
utility_code = template_utility_code.specialize( utility_code = template_utility_code.specialize(
type = self.typedef_cname, type = self.typedef_cname,
TypeName = type_name) TypeName = type_name)
...@@ -3141,10 +3141,10 @@ class CppClassType(CType): ...@@ -3141,10 +3141,10 @@ class CppClassType(CType):
X[ix], X[ix], T.from_py_function, except_clause)) X[ix], X[ix], T.from_py_function, except_clause))
if self.cname in cpp_string_conversions: if self.cname in cpp_string_conversions:
cls = 'string' cls = 'string'
tags = self.cname.replace(':', '_'), tags = type_identifier(self),
else: else:
cls = self.cname[5:] cls = self.cname[5:]
cname = '__pyx_convert_%s_from_py_%s' % (cls, '____'.join(tags)) cname = '__pyx_convert_%s_from_py_%s' % (cls, '__and_'.join(tags))
context = { context = {
'template_type_declarations': '\n'.join(declarations), 'template_type_declarations': '\n'.join(declarations),
'cname': cname, 'cname': cname,
...@@ -3176,7 +3176,7 @@ class CppClassType(CType): ...@@ -3176,7 +3176,7 @@ class CppClassType(CType):
if self.cname in cpp_string_conversions: if self.cname in cpp_string_conversions:
cls = 'string' cls = 'string'
prefix = 'PyObject_' # gets specialised by explicit type casts in CoerceToPyTypeNode prefix = 'PyObject_' # gets specialised by explicit type casts in CoerceToPyTypeNode
tags = self.cname.replace(':', '_'), tags = type_identifier(self),
else: else:
cls = self.cname[5:] cls = self.cname[5:]
prefix = '' prefix = ''
......
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