python: fix CV_WRAP_AS handling
This commit is contained in:
@@ -255,6 +255,8 @@ class CppHeaderParser(object):
|
||||
l = l.replace("CV_EXPORTS_W_SIMPLE", "")
|
||||
modlist.append("/Simple")
|
||||
npos = l.find("CV_EXPORTS_AS")
|
||||
if npos < 0:
|
||||
npos = l.find('CV_WRAP_AS')
|
||||
if npos >= 0:
|
||||
macro_arg, npos3 = self.get_macro_arg(l, npos)
|
||||
modlist.append("=" + macro_arg)
|
||||
@@ -825,7 +827,11 @@ class CppHeaderParser(object):
|
||||
continue
|
||||
state = SCAN
|
||||
l = re.sub(r'//(.+)?', '', l).strip() # drop // comment
|
||||
if l == '#if 0' or l == '#if defined(__OPENCV_BUILD)' or l == '#ifdef __OPENCV_BUILD':
|
||||
if l in [
|
||||
'#if 0',
|
||||
'#if defined(__OPENCV_BUILD)', '#ifdef __OPENCV_BUILD',
|
||||
'#if !defined(OPENCV_BINDING_PARSER)', '#ifndef OPENCV_BINDING_PARSER',
|
||||
]:
|
||||
state = DIRECTIVE_IF_0
|
||||
depth_if_0 = 1
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user