diff options
| author | Damien George | 2014-08-12 18:33:40 +0100 |
|---|---|---|
| committer | Damien George | 2014-08-12 18:33:40 +0100 |
| commit | 4c03b3a899d49f0f4f2c54903403aaa9b384c315 (patch) | |
| tree | 98a086456f0f5ce8a8108522f1e11c64697eda43 /py/builtin.h | |
| parent | 69c5fe1df676fe5331d5ba9749d84016703e1a59 (diff) | |
py: Implement builtin reversed() function.
reversed function now implemented, and works for tuple, list, str, bytes
and user objects with __len__ and __getitem__.
Renamed mp_builtin_len to mp_obj_len to make it publically available (eg
for reversed).
Diffstat (limited to 'py/builtin.h')
| -rw-r--r-- | py/builtin.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/builtin.h b/py/builtin.h index 425cfec09..25edf3289 100644 --- a/py/builtin.h +++ b/py/builtin.h @@ -26,6 +26,7 @@ mp_obj_t mp_builtin___import__(uint n_args, mp_obj_t *args); mp_obj_t mp_builtin_open(uint n_args, const mp_obj_t *args); +mp_obj_t mp_builtin_len(mp_obj_t o); MP_DECLARE_CONST_FUN_OBJ(mp_builtin___build_class___obj); MP_DECLARE_CONST_FUN_OBJ(mp_builtin___import___obj); |
