diff options
| author | Jeff Epler <jepler@unpythonic.net> | 2018-03-26 18:13:49 -0500 |
|---|---|---|
| committer | Jeff Epler <jepler@unpythonic.net> | 2018-03-26 18:13:49 -0500 |
| commit | 355bf8b5538b4fe2f9f07b0d8fb2f4500c2f96c6 (patch) | |
| tree | e14a249dee6038a3873715797aee82e92e9b3bec /shared-module | |
| parent | fa884466793738338edb7389dc6b21f160bba37b (diff) | |
Conditionally compile out nonstandard array/struct typecodes
.. defaulting to off for circuitpython-supported boards, on for others.
.. fixing up the tests that fail when it is turned off, so that they skip
instead of failing
Diffstat (limited to 'shared-module')
| -rw-r--r-- | shared-module/struct/__init__.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shared-module/struct/__init__.c b/shared-module/struct/__init__.c index e944f7738..eac41c9c3 100644 --- a/shared-module/struct/__init__.c +++ b/shared-module/struct/__init__.c @@ -33,9 +33,11 @@ #include "py/parsenum.h" void struct_validate_format(char fmt) { +#if MICROPY_NONSTANDARD_TYPECODES if( fmt == 'S' || fmt == 'O') { mp_raise_RuntimeError("'S' and 'O' are not supported format types"); } +#endif } char get_fmt_type(const char **fmt) { |
