Commit 0ae1dd51 authored by gsamain's avatar gsamain

Handle inheritance for ccdef classes

parent 59bde8d4
......@@ -7168,10 +7168,10 @@ class AttributeNode(ExprNode):
# (AnalyseExpressionsTransform)
self.member = self.entry.cname
if obj.type.nogil:
return "%s" % self.entry.func_cname
else:
return "((struct %s *)%s%s%s)->%s" % (
#if obj.type.nogil:
# return "%s" % self.entry.func_cname
#else:
return "((struct %s *)%s%s%s)->%s" % (
obj.type.vtabstruct_cname, obj_code, self.op,
obj.type.vtabslot_cname, self.member)
elif self.result_is_used:
......@@ -8771,7 +8771,8 @@ class DictNode(ExprNode):
self.allocate_temp_result(code)
if hasattr(self.type, 'nogil') and self.type.nogil:
code.putln("%s = (struct %s *)malloc(sizeof(struct %s));" % (self.result(), self.type.objstruct_cname, self.type.objstruct_cname))
code.put_cyincref(self.result()) # FIXME: or gotref ?
code.putln("%s->%s = %s;" % (self.result(), self.type.vtabslot_cname, self.type.vtabptr_cname))
code.putln("_CyObject_CAST(%s)->ob_refcnt = 1;" % self.result())
is_dict = self.type.is_pyobject
if is_dict:
......
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