mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
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.
This commit is contained in:
parent
319c47fcdb
commit
114900298e
7 changed files with 40 additions and 36 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue