aboutsummaryrefslogtreecommitdiff
path: root/py/mpstate.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-05-16 19:20:52 +1000
committerDamien George <damien@micropython.org>2022-05-17 12:51:54 +1000
commitc49d5207e9437755be364639632be31c001955a8 (patch)
tree3eb8ea6a6af8231c252b5e50173a5d34e5db2390 /py/mpstate.h
parentb295b6f1f3dd529eea564b9e08b75c7ab4f48ce4 (diff)
py/persistentcode: Remove unicode feature flag from .mpy file.
Prior to this commit, even with unicode disabled .py and .mpy files could contain unicode characters, eg by entering them directly in a string as utf-8 encoded. The only thing the compiler disallowed (with unicode disabled) was using \uxxxx and \Uxxxxxxxx notation to specify a character within a string with value >= 0x100; that would give a SyntaxError. With this change mpy-cross will now accept \u and \U notation to insert a character with value >= 0x100 into a string (because the -mno-unicode option is now gone, there's no way to forbid this). The runtime will happily work with strings with such characters, just like it already works with strings with characters that were utf-8 encoded directly. This change simplifies things because there are no longer any feature flags in .mpy files, and any bytecode .mpy will now run on any target. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/mpstate.h')
-rw-r--r--py/mpstate.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/py/mpstate.h b/py/mpstate.h
index bc1aaf1e0..98aa9a849 100644
--- a/py/mpstate.h
+++ b/py/mpstate.h
@@ -55,7 +55,6 @@ enum {
#if MICROPY_DYNAMIC_COMPILER
typedef struct mp_dynamic_compiler_t {
uint8_t small_int_bits; // must be <= host small_int_bits
- bool py_builtins_str_unicode;
uint8_t native_arch;
uint8_t nlr_buf_num_regs;
} mp_dynamic_compiler_t;