summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/mpconfig.h4
-rw-r--r--py/runtime.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 1eb2acf53..6ff069291 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -107,6 +107,10 @@ typedef long long mp_longint_impl_t;
#define MICROPY_PATH_MAX (512)
#endif
+// Additional builtin function definitions - see runtime.c:builtin_table for format.
+#ifndef MICROPY_EXTRA_BUILTINS
+#define MICROPY_EXTRA_BUILTINS
+#endif
/*****************************************************************************/
/* Miscellaneous settings */
diff --git a/py/runtime.c b/py/runtime.c
index d15a38e08..b473a951f 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -144,6 +144,9 @@ STATIC const mp_builtin_elem_t builtin_table[] = {
{ MP_QSTR_str, (mp_obj_t)&mp_builtin_str_obj },
{ MP_QSTR_bytearray, (mp_obj_t)&mp_builtin_bytearray_obj },
+ // Extra builtins as defined by a port
+ MICROPY_EXTRA_BUILTINS
+
{ MP_QSTR_, MP_OBJ_NULL }, // end of list sentinel
};