Commit 96416479 authored by Robert Bradshaw's avatar Robert Bradshaw

Fix unbound method optimization for static types.

parent dd854104
...@@ -5324,10 +5324,13 @@ class AttributeNode(ExprNode): ...@@ -5324,10 +5324,13 @@ class AttributeNode(ExprNode):
# as an ordinary function. # as an ordinary function.
if entry.func_cname: if entry.func_cname:
cname = entry.func_cname cname = entry.func_cname
# Fix self type. if entry.type.is_static_method:
ctype = copy.copy(entry.type) ctype = entry.type
ctype.args = ctype.args[:] else:
ctype.args[0] = PyrexTypes.CFuncTypeArg('self', type, 'self', None) # Fix self type.
ctype = copy.copy(entry.type)
ctype.args = ctype.args[:]
ctype.args[0] = PyrexTypes.CFuncTypeArg('self', type, 'self', None)
else: else:
cname = "%s->%s" % (type.vtabptr_cname, entry.cname) cname = "%s->%s" % (type.vtabptr_cname, entry.cname)
ctype = entry.type ctype = entry.type
......
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