diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/structmodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/structmodule.c b/Modules/structmodule.c index 0cf996f..d837e02 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; |