Commit ae6315f6 authored by gsamain's avatar gsamain

Fix cypclass (un)starred declaration code

parent 8b04a094
......@@ -10865,7 +10865,7 @@ class SizeofTypeNode(SizeofNode):
error(self.pos, "Cannot take sizeof incomplete type '%s'" % arg_type)
def calculate_result_code(self):
if self.arg_type.is_extension_type:
if self.arg_type.is_extension_type or self.arg_type.is_cyp_class:
# the size of the pointer is boring
# we want the size of the actual struct
arg_code = self.arg_type.declaration_code("", deref=1)
......
......@@ -3893,10 +3893,15 @@ class CppClassType(CType):
class CypClassType(CppClassType):
is_cyp_class = 1
def empty_declaration_code(self):
if self._empty_declaration is None:
self._empty_declaration = self.declaration_code('', deref=1)
return self._empty_declaration
def declaration_code(self, entity_code,
for_display = 0, dll_linkage = None, pyrex = 0,
template_params = None):
if entity_code:
template_params = None, deref = 0):
if not deref:
entity_code = "*%s" % entity_code
return super(CypClassType, self).declaration_code(entity_code,
for_display=for_display, dll_linkage=dll_linkage,
......
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