diff options
author | Damien <damien.p.george@gmail.com> | 2013-12-29 19:33:23 +0000 |
---|---|---|
committer | Damien <damien.p.george@gmail.com> | 2013-12-29 19:33:23 +0000 |
commit | 732407f1bf12364375162e8fb73816532a5d139c (patch) | |
tree | bf795d7bab01d6d603eec761affac7091be9606a /py/parse.c | |
parent | a1c8e5737cebba08909104d47c1dfd16ef80e6a1 (diff) |
Change memory allocation API to require size for free and realloc.
Diffstat (limited to 'py/parse.c')
-rw-r--r-- | py/parse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/py/parse.c b/py/parse.c index b939ab8db..ad9a47ffb 100644 --- a/py/parse.c +++ b/py/parse.c @@ -94,8 +94,8 @@ typedef struct _parser_t { static void push_rule(parser_t *parser, const rule_t *rule, int arg_i) { if (parser->rule_stack_top >= parser->rule_stack_alloc) { + parser->rule_stack = m_renew(rule_stack_t, parser->rule_stack, parser->rule_stack_alloc, parser->rule_stack_alloc * 2); parser->rule_stack_alloc *= 2; - parser->rule_stack = m_renew(rule_stack_t, parser->rule_stack, parser->rule_stack_alloc); } parser->rule_stack[parser->rule_stack_top].rule_id = rule->rule_id; parser->rule_stack[parser->rule_stack_top].arg_i = arg_i; |