From 355bf8b5538b4fe2f9f07b0d8fb2f4500c2f96c6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 26 Mar 2018 18:13:49 -0500 Subject: 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 --- shared-module/struct/__init__.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shared-module/struct/__init__.c') 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) { -- cgit v1.2.3