diff options
author | Anthony Baxter <anthonybaxter@gmail.com> | 2006-04-11 05:39:14 (GMT) |
---|---|---|
committer | Anthony Baxter <anthonybaxter@gmail.com> | 2006-04-11 05:39:14 (GMT) |
commit | 114900298ea26e5e25edd5d05f24648dcd5ea95b (patch) | |
tree | 9db37abbea9f0bd5dc1332f6f710de5e521e3c2c /Parser/parser.c | |
parent | 319c47fcdb3b8196cc580c4fab409b0ee58119fe (diff) | |
download | cpython-114900298ea26e5e25edd5d05f24648dcd5ea95b.zip cpython-114900298ea26e5e25edd5d05f24648dcd5ea95b.tar.gz cpython-114900298ea26e5e25edd5d05f24648dcd5ea95b.tar.bz2 |
Fix the code in Parser/ to also compile with C++. This was mostly casts for
malloc/realloc type functions, as well as renaming one variable called 'new'
in tokensizer.c. Still lots more to be done, going to be checking in one
chunk at a time or the patch will be massively huge. Still compiles ok with
gcc.
Diffstat (limited to 'Parser/parser.c')
-rw-r--r-- | Parser/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Parser/parser.c b/Parser/parser.c index 45b613a..04d5817 100644 --- a/Parser/parser.c +++ b/Parser/parser.c @@ -75,7 +75,7 @@ PyParser_New(grammar *g, int start) if (!g->g_accel) PyGrammar_AddAccelerators(g); - ps = PyMem_MALLOC(sizeof(parser_state)); + ps = (parser_state *)PyMem_MALLOC(sizeof(parser_state)); if (ps == NULL) return NULL; ps->p_grammar = g; |