From: <el...@us...> - 2011-04-23 18:51:58
|
Revision: 14679 http://alleg.svn.sourceforge.net/alleg/?rev=14679&view=rev Author: elias Date: 2011-04-23 18:51:52 +0000 (Sat, 23 Apr 2011) Log Message: ----------- fix some small python wrapper problems Modified Paths: -------------- allegro/branches/5.1/python/CMakeLists.txt allegro/branches/5.1/python/generate_python_ctypes.py Modified: allegro/branches/5.1/python/CMakeLists.txt =================================================================== --- allegro/branches/5.1/python/CMakeLists.txt 2011-04-23 18:30:31 UTC (rev 14678) +++ allegro/branches/5.1/python/CMakeLists.txt 2011-04-23 18:51:52 UTC (rev 14679) @@ -2,7 +2,7 @@ add_custom_command( OUTPUT python_protos - DEPENDS ${CMAKE_BINARY_DIR}/docs/protos + DEPENDS ${ALL_SRC} COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/python/checkdocs.py -p python_protos -b ${CMAKE_BINARY_DIR} Modified: allegro/branches/5.1/python/generate_python_ctypes.py =================================================================== --- allegro/branches/5.1/python/generate_python_ctypes.py 2011-04-23 18:30:31 UTC (rev 14678) +++ allegro/branches/5.1/python/generate_python_ctypes.py 2011-04-23 18:51:52 UTC (rev 14679) @@ -132,6 +132,9 @@ mob = re.match("^.*?(\w+)$", param) if mob: pnamepos = mob.start(1) + if pnamepos == 0: + # Seems the parameter is not named + pnamepos = len(param) else: print(params) print(proto) @@ -418,8 +421,8 @@ line += "[" + (", ".join([a.__name__ for a in x.argtypes])) +\ "])\n" f.write(line) - except AttributeError: - print("Ignoring " + name + " because of errors.") + except AttributeError as e: + print("Ignoring " + name + " because of errors (" + str(e) + ").") # some stuff the automated parser doesn't pick up f.write(r""" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |