summaryrefslogtreecommitdiffstatshomepage
path: root/py/objstrunicode.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-07 06:46:55 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2016-08-07 06:46:55 +0300
commit56eb25f04928132f9921a1163684e626256e2a2c (patch)
treebbacd6e450cb6bb732cb4b3b75b7afee5aab7cfa /py/objstrunicode.c
parenta4aaf824219818c421b85436b0bf8f67468590d9 (diff)
downloadmicropython-56eb25f04928132f9921a1163684e626256e2a2c.tar.gz
micropython-56eb25f04928132f9921a1163684e626256e2a2c.zip
py/objstr: Make .partition()/.rpartition() methods configurable.
Default is disabled, enabled for unix port. Saves 600 bytes on x86.
Diffstat (limited to 'py/objstrunicode.c')
-rw-r--r--py/objstrunicode.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/objstrunicode.c b/py/objstrunicode.c
index 495ef3ae94..7b50dfeaa6 100644
--- a/py/objstrunicode.c
+++ b/py/objstrunicode.c
@@ -246,8 +246,10 @@ STATIC const mp_rom_map_elem_t struni_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_format), MP_ROM_PTR(&str_format_obj) },
{ MP_ROM_QSTR(MP_QSTR_replace), MP_ROM_PTR(&str_replace_obj) },
{ MP_ROM_QSTR(MP_QSTR_count), MP_ROM_PTR(&str_count_obj) },
+ #if MICROPY_PY_BUILTINS_STR_PARTITION
{ MP_ROM_QSTR(MP_QSTR_partition), MP_ROM_PTR(&str_partition_obj) },
{ MP_ROM_QSTR(MP_QSTR_rpartition), MP_ROM_PTR(&str_rpartition_obj) },
+ #endif
#if MICROPY_PY_BUILTINS_STR_CENTER
{ MP_ROM_QSTR(MP_QSTR_center), MP_ROM_PTR(&str_center_obj) },
#endif