Commit 53d7b8f4 authored by gsamain's avatar gsamain Committed by Xavier Thompson

Cpp: Correct void return type for CppClassScope special methods

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