summaryrefslogtreecommitdiffstats
path: root/Parser/parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/parser.c')
-rw-r--r--Parser/parser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Parser/parser.c b/Parser/parser.c
index 213410c..45302ed 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_NEW(parser_state, 1);
+ ps = (parser_state *)PyMem_MALLOC(sizeof(parser_state));
if (ps == NULL)
return NULL;
ps->p_grammar = g;
@@ -84,7 +84,7 @@ PyParser_New(grammar *g, int start)
#endif
ps->p_tree = PyNode_New(start);
if (ps->p_tree == NULL) {
- PyMem_DEL(ps);
+ PyMem_FREE(ps);
return NULL;
}
s_reset(&ps->p_stack);
@@ -98,7 +98,7 @@ PyParser_Delete(parser_state *ps)
/* NB If you want to save the parse tree,
you must set p_tree to NULL before calling delparser! */
PyNode_Free(ps->p_tree);
- PyMem_DEL(ps);
+ PyMem_FREE(ps);
}