summaryrefslogtreecommitdiffstats
path: root/Parser/asdl_c.py
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/asdl_c.py')
-rwxr-xr-xParser/asdl_c.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 082f232..4877853 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -299,10 +299,8 @@ class FunctionVisitor(PrototypeVisitor):
emit('}', 1)
emit("p = (%s)PyArena_Malloc(arena, sizeof(*p));" % ctype, 1);
- emit("if (!p) {", 1)
- emit("PyErr_NoMemory();", 2)
+ emit("if (!p)", 1)
emit("return NULL;", 2)
- emit("}", 1)
if union:
self.emit_body_union(name, args, attrs)
else:
@@ -474,7 +472,7 @@ static PyObject* ast2obj_bool(bool b)
return PyBool_FromLong(b);
}
-static PyObject* ast2obj_int(bool b)
+static PyObject* ast2obj_int(long b)
{
return PyInt_FromLong(b);
}