summaryrefslogtreecommitdiffstats
path: root/Parser/parser.c
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 05:39:14 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2006-04-11 05:39:14 (GMT)
commit114900298ea26e5e25edd5d05f24648dcd5ea95b (patch)
tree9db37abbea9f0bd5dc1332f6f710de5e521e3c2c /Parser/parser.c
parent319c47fcdb3b8196cc580c4fab409b0ee58119fe (diff)
downloadcpython-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.c2
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;