summaryrefslogtreecommitdiff
path: root/shared-module/struct
diff options
context:
space:
mode:
authorsommersoft <sommersoft@gmail.com>2018-04-06 01:58:29 +0000
committersommersoft <sommersoft@gmail.com>2018-04-06 01:58:29 +0000
commitcc644032ea81783de0e1e15b90dac2ce7913011b (patch)
treef859d54e7b8830b96cf9965dcb54c2f2daaaa21a /shared-module/struct
parentd1974e0038f18ed2ffc59f0f198d998070f4c618 (diff)
parent6ee573c7c9e4912de8c518df73af81dd8c2fd935 (diff)
Merge branch 'super_status' of https://github.com/sommersoft/circuitpython into super_status
Diffstat (limited to 'shared-module/struct')
-rw-r--r--shared-module/struct/__init__.c2
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) {