diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2018-08-05 23:56:19 +0300 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-10-22 22:49:05 +1100 |
commit | 5a91fce9f868eeba37a0b1cf6c3b4435ed5eecec (patch) | |
tree | a81202c0b0a5d6d68790ea0a42fdb1ee395f6794 /py/mpconfig.h | |
parent | 7795b2e5c3e3dfeb20aaca751c45b4dfceedcc7f (diff) |
py/objstr: Make str.count() method configurable.
Configurable via MICROPY_PY_BUILTINS_STR_COUNT. Default is enabled.
Disabled for bare-arm, minimal, unix-minimal and zephyr ports. Disabling
it saves 408 bytes on x86.
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index cd2f2acdf..2e1efe7d5 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -765,6 +765,11 @@ typedef double mp_float_t; #define MICROPY_PY_BUILTINS_STR_CENTER (0) #endif +// Whether str.count() method provided +#ifndef MICROPY_PY_BUILTINS_STR_COUNT +#define MICROPY_PY_BUILTINS_STR_COUNT (1) +#endif + // Whether str % (...) formatting operator provided #ifndef MICROPY_PY_BUILTINS_STR_OP_MODULO #define MICROPY_PY_BUILTINS_STR_OP_MODULO (1) |