]> granicus.if.org Git - python/commitdiff
When the parameter to PyInt_AsLong() has already been checked with
authorFred Drake <fdrake@acm.org>
Wed, 17 Feb 1999 17:35:53 +0000 (17:35 +0000)
committerFred Drake <fdrake@acm.org>
Wed, 17 Feb 1999 17:35:53 +0000 (17:35 +0000)
PyInt_Check(), use PyInt_AS_LONG() instead (two places).

Modules/parsermodule.c

index d0ba9e99603f00d0ae47566a30d03a84d6a151b5..6dd3be354203fdad5355d1e1de539e772dcb07c4 100644 (file)
@@ -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);
            }
        }