- extra spaces are removed

- static class member modifier processing is fixed (moved from 'rettype' to 'func_modlist')
This commit is contained in:
Andrey Pavlenko 2011-05-17 12:52:07 +00:00
parent 2935bb29e5
commit 0f5f60f7f5
2 changed files with 92 additions and 91 deletions

View File

@ -749,8 +749,9 @@ class PythonWrapperGenerator(object):
if __name__ == "__main__":
srcfiles = hdr_parser.opencv_hdr_list
dstdir = "/Users/vp/tmp"
if len(sys.argv) > 2:
if len(sys.argv) > 1:
dstdir = sys.argv[1]
if len(sys.argv) > 2:
srcfiles = sys.argv[2:]
generator = PythonWrapperGenerator()
generator.gen(srcfiles, dstdir)

View File

@ -251,7 +251,7 @@ class CppHeaderParser(object):
[const] {; | <function_body>}
Returns the function declaration entry:
[<function_name>, <rettype>, <the_list_of_argument_descriptions>] (see above)
[<func name>, <return value C-type>, <list of modifiers>, <list of arguments>] (see above)
"""
if not (("CV_EXPORTS_AS" in decl_str) or ("CV_EXPORTS_W" in decl_str) or \
@ -400,7 +400,7 @@ class CppHeaderParser(object):
return []
if static_method:
rettype = " ".join([rettype, "/S"])
func_modlist.append("/S")
return [funcname, rettype, func_modlist, args]