Support non-static phantom methods for binding generator

This commit is contained in:
Hamdi Sahloul 2018-08-25 14:15:50 +09:00
parent 7cdb0eafeb
commit 2bbe31a8f6

View File

@ -740,7 +740,7 @@ class FuncInfo(object):
if v.rettype:
code_decl += " " + v.rettype + " retval;\n"
code_fcall += "retval = "
if ismethod and not self.is_static:
if not v.isphantom and ismethod and not self.is_static:
code_fcall += "_self_->" + self.cname
else:
code_fcall += self.cname
@ -961,6 +961,7 @@ class PythonWrapperGenerator(object):
func.add_variant(decl, isphantom)
else:
if classname and not isconstructor:
if not isphantom:
cname = barename
func_map = self.classes[classname].methods
else: