py: Put all global state together in state structures.
This patch consolidates all global variables in py/ core into one place,
in a global structure. Root pointers are all located together to make
GC tracing easier and more efficient.
diff --git a/py/mpconfig.h b/py/mpconfig.h
index e3270bd..0faa6a7 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -488,6 +488,11 @@
#define MICROPY_PORT_CONSTANTS
#endif
+// Any root pointers for GC scanning - see mpstate.c
+#ifndef MICROPY_PORT_ROOT_POINTERS
+#define MICROPY_PORT_ROOT_POINTERS
+#endif
+
/*****************************************************************************/
/* Miscellaneous settings */