summaryrefslogtreecommitdiffstatshomepage
path: root/py/emitbc.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-24 22:42:28 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-24 22:42:28 +0000
commit41d02b654e5c844f85fbb79283eaebf35af60fbb (patch)
tree224166f307256d81c08564546634106f7a8b0435 /py/emitbc.c
parentceb87835fe24873cd8b2f7d1d3d88cb6144e33b8 (diff)
downloadmicropython-41d02b654e5c844f85fbb79283eaebf35af60fbb.tar.gz
micropython-41d02b654e5c844f85fbb79283eaebf35af60fbb.zip
py: Improve freeing of emitters in mp_compile.
There can be multiple emitters allocated during compile (eg byte code and native).
Diffstat (limited to 'py/emitbc.c')
-rw-r--r--py/emitbc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/py/emitbc.c b/py/emitbc.c
index d66202eb2a..10a95fbcfa 100644
--- a/py/emitbc.c
+++ b/py/emitbc.c
@@ -43,7 +43,7 @@ emit_t *emit_bc_new(uint max_num_labels) {
return emit;
}
-static void emit_bc_free(emit_t *emit) {
+void emit_bc_free(emit_t *emit) {
m_del(uint, emit->label_offsets, emit->max_num_labels);
m_del_obj(emit_t, emit);
}
@@ -756,8 +756,6 @@ static void emit_bc_yield_from(emit_t *emit) {
}
const emit_method_table_t emit_bc_method_table = {
- emit_bc_free,
-
emit_bc_set_native_types,
emit_bc_start_pass,
emit_bc_end_pass,