Use argument value for 'mat' in call to format for vector_mat and vector_mat_template

The hard-coded string value "Mat" was used in the two format strings for vector_mat and vector_mat_template, preventing UMat arguments to functions that have these types from working correctly. Notably, #12231 references this issue.
pull/22008/head
Zach Lowry 5 years ago committed by GitHub
parent 87a692b89e
commit 61d7d67c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      modules/python/src2/hdr_parser.py

@ -571,8 +571,8 @@ class CppHeaderParser(object):
arg_type, arg_name, modlist, argno = self.parse_arg(a, argno) arg_type, arg_name, modlist, argno = self.parse_arg(a, argno)
if self.wrap_mode: if self.wrap_mode:
# TODO: Vectors should contain UMat, but this is not very easy to support and not very needed # TODO: Vectors should contain UMat, but this is not very easy to support and not very needed
vector_mat = "vector_{}".format("Mat") vector_mat = "vector_{}".format(mat)
vector_mat_template = "vector<{}>".format("Mat") vector_mat_template = "vector<{}>".format(mat)
if arg_type == "InputArray": if arg_type == "InputArray":
arg_type = mat arg_type = mat

Loading…
Cancel
Save