Commit 904fc549 authored by gsamain's avatar gsamain

Correct void return type for CppClassScope special methods

parent e3b09df7
...@@ -2430,7 +2430,7 @@ class CppClassScope(Scope): ...@@ -2430,7 +2430,7 @@ class CppClassScope(Scope):
if name in (class_name, '__init__') and cname is None: if name in (class_name, '__init__') and cname is None:
cname = "%s__init__%s" % (Naming.func_prefix, class_name) cname = "%s__init__%s" % (Naming.func_prefix, class_name)
name = '<init>' name = '<init>'
type.return_type = PyrexTypes.CVoidType() type.return_type = PyrexTypes.c_void_type
# This is called by the actual constructor, but need to support # This is called by the actual constructor, but need to support
# arguments that cannot by called by value. # arguments that cannot by called by value.
type.original_args = type.args type.original_args = type.args
...@@ -2444,7 +2444,7 @@ class CppClassScope(Scope): ...@@ -2444,7 +2444,7 @@ class CppClassScope(Scope):
elif name == '__dealloc__' and cname is None: elif name == '__dealloc__' and cname is None:
cname = "%s__dealloc__%s" % (Naming.func_prefix, class_name) cname = "%s__dealloc__%s" % (Naming.func_prefix, class_name)
name = '<del>' name = '<del>'
type.return_type = PyrexTypes.CVoidType() type.return_type = PyrexTypes.c_void_type
if name in ('<init>', '<del>') and type.nogil: if name in ('<init>', '<del>') and type.nogil:
for base in self.type.base_classes: for base in self.type.base_classes:
base_entry = base.scope.lookup(name) base_entry = base.scope.lookup(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