[issue26476] Constness in _PyErr_BadInternalCall
Serhiy Storchaka
report at bugs.python.org
Thu Mar 3 11:11:42 EST 2016
Serhiy Storchaka added the comment:
OK, now I understand. Since _PyErr_BadInternalCall() is private function, we will not break any code. Since it is used only by the PyErr_BadInternalCall() macro and always called with string literal as an argument, C++ user can't use PyErr_BadInternalCall() (without a trick described below). Thus the patch fixes a bug. Thank you Jeroen.
The workaround for unpatched Python 2.7 is to undefine the PyErr_BadInternalCall() macro.
#undef PyErr_BadInternalCall
There is the PyErr_BadInternalCall() function hidden by the macro. It provides less detailed error message, without file name and line number.
----------
assignee: -> serhiy.storchaka
stage: -> commit review
type: -> compile error
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26476>
_______________________________________
More information about the Python-bugs-list
mailing list