aboutsummaryrefslogtreecommitdiff
path: root/bare-arm
diff options
context:
space:
mode:
authorDamien George2014-09-23 15:31:56 +0000
committerDamien George2014-09-23 15:31:56 +0000
commit52b5d76a6b0c5e4c779211fdf7bca56d87a2f83e (patch)
treeea4bae0dd4ba80e80ec8e540882c97df1988ce67 /bare-arm
parentd6230f62c785c6c1ef1797500617c33e24607980 (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 'bare-arm')
-rw-r--r--bare-arm/main.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/bare-arm/main.c b/bare-arm/main.c
index 286e41cd4..983810c89 100644
--- a/bare-arm/main.c
+++ b/bare-arm/main.c
@@ -35,7 +35,6 @@ void do_str(const char *src) {
qstr source_name = mp_lexer_source_name(lex);
mp_lexer_free(lex);
mp_obj_t module_fun = mp_compile(pn, source_name, MP_EMIT_OPT_NONE, true);
- mp_parse_node_free(pn);
if (module_fun == mp_const_none) {
// compile error