summaryrefslogtreecommitdiff
path: root/shared-module/struct
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2018-03-26 20:01:34 -0400
committerGitHub <noreply@github.com>2018-03-26 20:01:34 -0400
commit4190aa2eed261171854f384840b528527958b78c (patch)
tree8d1fb2db3c5ea0f3f33ee5ac8643accc6a6b17c3 /shared-module/struct
parentea39f4378e01a12957493cc7cb5fd57a2c21bf6a (diff)
parent355bf8b5538b4fe2f9f07b0d8fb2f4500c2f96c6 (diff)
Merge pull request #715 from jepler/array-operation-restrictions-bis
Remove 'O', 'P' support in arrays
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) {