summaryrefslogtreecommitdiff
path: root/py/builtintables.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-10-25 21:59:14 +0100
committerDamien George <damien.p.george@gmail.com>2014-10-25 22:07:25 +0100
commitc9fc62072330421dbbcfa316569b51601a7f0349 (patch)
treed7044bdc0e84396822fea1e24f4220d8917ca847 /py/builtintables.c
parente5a3759ff5478392f914ba7a7346da60d9735bf4 (diff)
py: Implement compile builtin, enabled only on unix port.
This should be pretty compliant with CPython, except perhaps for some corner cases to do with globals/locals context. Addresses issue #879.
Diffstat (limited to 'py/builtintables.c')
-rw-r--r--py/builtintables.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/py/builtintables.c b/py/builtintables.c
index c8dea6bc7..2a5ced52d 100644
--- a/py/builtintables.c
+++ b/py/builtintables.c
@@ -91,6 +91,9 @@ STATIC const mp_map_elem_t mp_builtin_object_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_any), (mp_obj_t)&mp_builtin_any_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_bin), (mp_obj_t)&mp_builtin_bin_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_callable), (mp_obj_t)&mp_builtin_callable_obj },
+#if MICROPY_PY_BUILTINS_COMPILE
+ { MP_OBJ_NEW_QSTR(MP_QSTR_compile), (mp_obj_t)&mp_builtin_compile_obj },
+#endif
{ MP_OBJ_NEW_QSTR(MP_QSTR_chr), (mp_obj_t)&mp_builtin_chr_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_dir), (mp_obj_t)&mp_builtin_dir_obj },
{ MP_OBJ_NEW_QSTR(MP_QSTR_divmod), (mp_obj_t)&mp_builtin_divmod_obj },