summaryrefslogtreecommitdiff
path: root/Modules/structmodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1998-05-28 04:35:49 +0000
committerFred Drake <fdrake@acm.org>1998-05-28 04:35:49 +0000
commite24f8f3c8211058fd90d09b20d78f1d519896eed (patch)
tree0ad60b0f7036a03aa51e2a1f146b1a24d5390f14 /Modules/structmodule.c
parentf7a6663c40cbea2e30cb22ab2babc46368001b5f (diff)
downloadcpython-e24f8f3c8211058fd90d09b20d78f1d519896eed.tar.gz
get_long(): Use PyErr_ExceptionMatches(...) instead of PyErr_Occurred(...).
Diffstat (limited to 'Modules/structmodule.c')
-rw-r--r--Modules/structmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/structmodule.c b/Modules/structmodule.c
index 0cf996fb99..d837e02dc0 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;