summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>1999-02-17 17:35:53 (GMT)
committerFred Drake <fdrake@acm.org>1999-02-17 17:35:53 (GMT)
commit1a566ff2e8bae5ce10ed0647820e956e490753db (patch)
treec58778c5bcd8d1322a17cfca94e2b315c727e355 /Modules
parent8f2918f4fa075af61c63ef076a01ee7b1d5d83d8 (diff)
downloadcpython-1a566ff2e8bae5ce10ed0647820e956e490753db.zip
cpython-1a566ff2e8bae5ce10ed0647820e956e490753db.tar.gz
cpython-1a566ff2e8bae5ce10ed0647820e956e490753db.tar.bz2
When the parameter to PyInt_AsLong() has already been checked with
PyInt_Check(), use PyInt_AS_LONG() instead (two places).
Diffstat (limited to 'Modules')
-rw-r--r--Modules/parsermodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c
index d0ba9e9..6dd3be3 100644
--- a/Modules/parsermodule.c
+++ b/Modules/parsermodule.c
@@ -670,7 +670,7 @@ parser_tuple2ast(self, args)
ok = (temp != NULL) && PyInt_Check(temp);
if (ok)
/* this is used after the initial checks: */
- start_sym = PyInt_AsLong(temp);
+ start_sym = PyInt_AS_LONG(temp);
Py_XDECREF(temp);
}
if (ok) {
@@ -810,7 +810,7 @@ build_node_children(tuple, root, line_num)
else {
ok = PyInt_Check(temp);
if (ok)
- type = PyInt_AsLong(temp);
+ type = PyInt_AS_LONG(temp);
Py_DECREF(temp);
}
}