[Python-checkins] CVS: python/dist/src/Include pyerrors.h,2.38,2.39
Fred L. Drake
python-dev@python.org
Thu, 24 Aug 2000 15:38:41 -0700
Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv23579/Include
Modified Files:
pyerrors.h
Log Message:
Improve the exceptions raised by PyErr_BadInternalCall(); adding the
filename and line number of the call site to allow esier debugging.
This closes SourceForge patch #101214.
Index: pyerrors.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pyerrors.h,v
retrieving revision 2.38
retrieving revision 2.39
diff -C2 -r2.38 -r2.39
*** pyerrors.h 2000/07/08 17:25:55 2.38
--- pyerrors.h 2000/08/24 22:38:39 2.39
***************
*** 83,87 ****
--- 83,92 ----
#endif
+ /* Export the old function so that the existing API remains available: */
extern DL_IMPORT(void) PyErr_BadInternalCall(void);
+ extern DL_IMPORT(void) _PyErr_BadInternalCall(char *filename, int lineno);
+ /* Mask the old API with a call to the new API for code compiled under
+ Python 2.0: */
+ #define PyErr_BadInternalCall() _PyErr_BadInternalCall(__FILE__, __LINE__)
/* Function to create a new exception */