summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xParser/asdl_c.py2
-rw-r--r--Python/Python-ast.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Parser/asdl_c.py b/Parser/asdl_c.py
index 496ad01ebb..94e04b1c02 100755
--- a/Parser/asdl_c.py
+++ b/Parser/asdl_c.py
@@ -938,7 +938,7 @@ mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena)
{
mod_ty res;
init_types();
- if (!PyObject_IsInstance(ast, mod_type)) {
+ if (!PyObject_IsInstance(ast, (PyObject*)mod_type)) {
PyErr_SetString(PyExc_TypeError, "expected either Module, Interactive "
"or Expression node");
return NULL;
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index e89c9d57e8..464d28d34b 100644
--- a/Python/Python-ast.c
+++ b/Python/Python-ast.c
@@ -6419,7 +6419,7 @@ mod_ty PyAST_obj2mod(PyObject* ast, PyArena* arena)
{
mod_ty res;
init_types();
- if (!PyObject_IsInstance(ast, mod_type)) {
+ if (!PyObject_IsInstance(ast, (PyObject*)mod_type)) {
PyErr_SetString(PyExc_TypeError, "expected either Module, Interactive "
"or Expression node");
return NULL;