]> granicus.if.org Git - python/commitdiff
Make asdl_c.py to generate Python-ast.c changed in issue #15989.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 6 Sep 2015 20:29:04 +0000 (23:29 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 6 Sep 2015 20:29:04 +0000 (23:29 +0300)
Parser/asdl_c.py

index a5e35d93fd29d26d55c3c34c00fd7ea663f2a8d2..d5971226b1885aaf12ff36f7128205a690bc3dd6 100755 (executable)
@@ -898,7 +898,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
         return 1;
     }
 
-    i = (int)PyLong_AsLong(obj);
+    i = _PyLong_AsInt(obj);
     if (i == -1 && PyErr_Occurred())
         return 1;
     *out = i;