Commits

Fred Drake  committed d1686cf

When the parameter to PyInt_AsLong() has already been checked with
PyInt_Check(), use PyInt_AS_LONG() instead (two places).

  • Participants
  • Parent commits 1fbc4ba
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Modules/parsermodule.c

 	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) {
 	    else {
 		ok = PyInt_Check(temp);
 		if (ok)
-		    type = PyInt_AsLong(temp);
+		    type = PyInt_AS_LONG(temp);
 		Py_DECREF(temp);
 	    }
 	}