diff options
author | Damien George <damien.p.george@gmail.com> | 2014-09-23 15:31:56 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-09-23 15:31:56 +0000 |
commit | 52b5d76a6b0c5e4c779211fdf7bca56d87a2f83e (patch) | |
tree | ea4bae0dd4ba80e80ec8e540882c97df1988ce67 /py/compile.h | |
parent | d6230f62c785c6c1ef1797500617c33e24607980 (diff) |
py: Free non-interned strings in the parser when not needed.
mp_parse_node_free now frees the memory associated with non-interned
strings. And the parser calls mp_parse_node_free when discarding a
non-used node (such as a doc string).
Also, the compiler now frees the parse tree explicitly just before it
exits (as opposed to relying on the caller to do this).
Addresses issue #708 as best we can.
Diffstat (limited to 'py/compile.h')
-rw-r--r-- | py/compile.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/compile.h b/py/compile.h index 52c42aff4..983a443e9 100644 --- a/py/compile.h +++ b/py/compile.h @@ -33,4 +33,5 @@ enum { MP_EMIT_OPT_ASM_THUMB, }; +// the compiler will free the parse tree (pn) before it returns mp_obj_t mp_compile(mp_parse_node_t pn, qstr source_file, uint emit_opt, bool is_repl); |