From 2a9e252f777823ef732dc18f685ffa58152fa601 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Thu, 21 Aug 2014 17:31:01 +0400 Subject: [PATCH] fix namespace conflicts (like cv::inpaint and cv::xphoto::inpaint) whitespace fix --- modules/python/src2/gen2.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/python/src2/gen2.py b/modules/python/src2/gen2.py index bacd8582ae..cf60ea9785 100755 --- a/modules/python/src2/gen2.py +++ b/modules/python/src2/gen2.py @@ -509,7 +509,7 @@ class FuncInfo(object): name = "getelem" else: classname = "" - return "pyopencv_" + classname + name + return "pyopencv_" + self.namespace.replace('.','_') + '_' + classname + name def get_wrapper_prototype(self): full_fname = self.get_wrapper_name() @@ -760,7 +760,7 @@ class PythonWrapperGenerator(object): del chunks[-2] base = '_'.join(chunks) if base not in self.classes: - print("Generator error: unable to resolve base %s for %s" + print("Generator error: unable to resolve base %s for %s" % (classinfo.bases[0], classinfo.name)) sys.exit(-1) classinfo.bases[0] = "::".join(chunks)