From: Fred Drake Date: Thu, 28 May 1998 04:35:49 +0000 (+0000) Subject: get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...). X-Git-Tag: v1.5.2a1~539 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3dbb38e98ed82234c9d14e963ee2e5bebaf99eb;p=thirdparty%2FPython%2Fcpython.git get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...). --- diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 0cf996fb99f0..d837e02dc0a5 100644 --- a/Modules/structmodule.c +++ b/Modules/structmodule.c @@ -107,7 +107,7 @@ get_long(v, p) { long x = PyInt_AsLong(v); if (x == -1 && PyErr_Occurred()) { - if (PyErr_Occurred() == PyExc_TypeError) + if (PyErr_ExceptionMatches(PyExc_TypeError)) PyErr_SetString(StructError, "required argument is not an integer"); return -1;