mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 14:36:36 +08:00
Merge pull request #23268 from VadimLevin:dev/vlevin/bindings-io-arg-modifiers-fix
fix: remove extra '/O' modifier for '/IO' arguments
This commit is contained in:
commit
29cc675375
@ -448,6 +448,15 @@ class ArgInfo(object):
|
||||
self.py_outputarg = False
|
||||
self.enclosing_arg = enclosing_arg
|
||||
|
||||
def __str__(self):
|
||||
return 'ArgInfo("{}", tp="{}", default="{}", in={}, out={})'.format(
|
||||
self.name, self.tp, self.defval, self.inputarg,
|
||||
self.outputarg
|
||||
)
|
||||
|
||||
def __repr__(self):
|
||||
return str(self)
|
||||
|
||||
@property
|
||||
def export_name(self):
|
||||
if self.name in python_reserved_keywords:
|
||||
|
@ -616,6 +616,8 @@ class CppHeaderParser(object):
|
||||
("InputOutputArray", mat),
|
||||
("OutputArray", mat),
|
||||
("noArray", arg_type)]).strip()
|
||||
if '/IO' in modlist and '/O' in modlist:
|
||||
modlist.remove('/O')
|
||||
args.append([arg_type, arg_name, defval, modlist])
|
||||
npos = arg_start-1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user