diff options
author | Fred Drake <fdrake@acm.org> | 1998-05-28 04:35:49 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1998-05-28 04:35:49 (GMT) |
commit | d3dbb38e98ed82234c9d14e963ee2e5bebaf99eb (patch) | |
tree | 5826822341e464862dcf00fda7a61b1969e463b9 | |
parent | bebc97fcd75fcd49ad31e9393378469cce1e1bc7 (diff) | |
download | cpython-d3dbb38e98ed82234c9d14e963ee2e5bebaf99eb.zip cpython-d3dbb38e98ed82234c9d14e963ee2e5bebaf99eb.tar.gz cpython-d3dbb38e98ed82234c9d14e963ee2e5bebaf99eb.tar.bz2 |
get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
-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; |