mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Support non-static phantom methods for binding generator
This commit is contained in:
parent
7cdb0eafeb
commit
2bbe31a8f6
@ -740,7 +740,7 @@ class FuncInfo(object):
|
|||||||
if v.rettype:
|
if v.rettype:
|
||||||
code_decl += " " + v.rettype + " retval;\n"
|
code_decl += " " + v.rettype + " retval;\n"
|
||||||
code_fcall += "retval = "
|
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
|
code_fcall += "_self_->" + self.cname
|
||||||
else:
|
else:
|
||||||
code_fcall += self.cname
|
code_fcall += self.cname
|
||||||
@ -961,7 +961,8 @@ class PythonWrapperGenerator(object):
|
|||||||
func.add_variant(decl, isphantom)
|
func.add_variant(decl, isphantom)
|
||||||
else:
|
else:
|
||||||
if classname and not isconstructor:
|
if classname and not isconstructor:
|
||||||
cname = barename
|
if not isphantom:
|
||||||
|
cname = barename
|
||||||
func_map = self.classes[classname].methods
|
func_map = self.classes[classname].methods
|
||||||
else:
|
else:
|
||||||
func_map = self.namespaces.setdefault(namespace, Namespace()).funcs
|
func_map = self.namespaces.setdefault(namespace, Namespace()).funcs
|
||||||
|
Loading…
Reference in New Issue
Block a user