diff options
Diffstat (limited to 'Python/ast.c')
-rw-r--r-- | Python/ast.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/ast.c b/Python/ast.c index bba599b..9b32f8b 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -78,7 +78,7 @@ static void ast_error_finish(const char *filename) { PyObject *type, *value, *tback, *errstr, *loc, *tmp; - int lineno; + long lineno; assert(PyErr_Occurred()); if (!PyErr_ExceptionMatches(PyExc_SyntaxError)) @@ -101,7 +101,7 @@ ast_error_finish(const char *filename) Py_INCREF(Py_None); loc = Py_None; } - tmp = Py_BuildValue("(ziOO)", filename, lineno, Py_None, loc); + tmp = Py_BuildValue("(zlOO)", filename, lineno, Py_None, loc); Py_DECREF(loc); if (!tmp) { Py_DECREF(errstr); @@ -261,7 +261,6 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename, /* Only a simple_stmt can contain multiple statements. */ REQ(n, simple_stmt); for (i = 0; i < NCH(n); i += 2) { - stmt_ty s; if (TYPE(CHILD(n, i)) == NEWLINE) break; s = ast_for_stmt(&c, CHILD(n, i)); @@ -1510,7 +1509,7 @@ ast_for_expr(struct compiling *c, const node *n) return NULL; } - asdl_seq_SET(ops, i / 2, (void *)operator); + asdl_seq_SET(ops, i / 2, (void *)(Py_uintptr_t)operator); asdl_seq_SET(cmps, i / 2, expression); } expression = ast_for_expr(c, CHILD(n, 0)); @@ -2031,7 +2030,7 @@ alias_for_import_name(struct compiling *c, const node *n) return alias(NEW_IDENTIFIER(CHILD(n, 0)), NULL, c->c_arena); else { /* Create a string of the form "a.b.c" */ - int i, len; + size_t i, len; char *s; len = 0; |