As mentioned by William, there are many SWIG symbols start with Py, which is againsted Python's suggestion (in http://www.python.org/doc/2.5.2/api/includes.html\):
user code should never define names that begin with "Py" or "_Py". This confuses the reader, and jeopardizes the portability of the user code to future Python versions, which may define additional names beginning with one of these prefixes.
This patch changed all those symbols, includes normal C/C++ symbols and SWIG fragments. A list of changes:
PySwig* -> SwigPy*
PyObject_ptr -> SwigPtr_PyObject
PyObject_var -> SwigVar_PyObject
PySequence_Base, PySequence_Cont, PySequence_Ref etc. -> SwigPySequence_Base, SwigPySequence_Cont, SwigPySequence_Ref
PyMap* -> SwigPyMap*
Two additional files, Lib/python/pyname_compat.i and Tootls/pyname_patch.py included in this patch. pyname_compat.i provides backward compatibility. pyname_patch.py is a tool used for automatically patch files for the name change.
Please kindly review it, thanks!
Log in to post a comment.