py: Fix bug where GC collected native/viper/asm function data.
Because (for Thumb) a function pointer has the LSB set, pointers to
dynamic functions in RAM (eg native, viper or asm functions) were not
being traced by the GC. This patch is a comprehensive fix for this.
Addresses issue #820.
diff --git a/py/asmthumb.c b/py/asmthumb.c
index 75ce168..1102bb7 100644
--- a/py/asmthumb.c
+++ b/py/asmthumb.c
@@ -132,8 +132,7 @@
}
void *asm_thumb_get_code(asm_thumb_t *as) {
- // need to set low bit to indicate that it's thumb code
- return (void *)(((mp_uint_t)as->code_base) | 1);
+ return as->code_base;
}
/*