Change object representation from 1 big union to individual structs.
A big change. Micro Python objects are allocated as individual structs
with the first element being a pointer to the type information (which
is itself an object). This scheme follows CPython. Much more flexible,
not necessarily slower, uses same heap memory, and can allocate objects
statically.
Also change name prefix, from py_ to mp_ (mp for Micro Python).
diff --git a/py/repl.c b/py/repl.c
index f295aff..ecf6e2d 100644
--- a/py/repl.c
+++ b/py/repl.c
@@ -11,7 +11,7 @@
return head[i] == '\0' && (str[i] == '\0' || !g_unichar_isalpha(str[i]));
}
-bool py_repl_is_compound_stmt(const char *line) {
+bool mp_repl_is_compound_stmt(const char *line) {
// compound if line starts with a certain keyword
if (
str_startswith_word(line, "if")