summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-12 20:02:26 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-12 20:02:26 +0100
commit105e32f1a5126698b9032d013edffb12a550c0ce (patch)
tree8525ac8430c08b491964f19b90677af0b3835463
parentf20375eedd22eeee5f1b273f891631bed8878cdc (diff)
downloadmicropython-105e32f1a5126698b9032d013edffb12a550c0ce.tar.gz
micropython-105e32f1a5126698b9032d013edffb12a550c0ce.zip
stmhal: Enable moductypes by default.
Also fixes compiler error in moductypes when compiled without debugging. Addresses issue #778.
-rw-r--r--extmod/moductypes.c2
-rw-r--r--stmhal/mpconfigport.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/extmod/moductypes.c b/extmod/moductypes.c
index 7480224f22..ad2a106b41 100644
--- a/extmod/moductypes.c
+++ b/extmod/moductypes.c
@@ -315,6 +315,7 @@ STATIC mp_obj_t get_aligned(uint val_type, void *p, mp_int_t index) {
return mp_obj_new_float(((double*)p)[index]);
default:
assert(0);
+ return MP_OBJ_NULL;
}
}
@@ -513,6 +514,7 @@ STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_ob
}
assert(0);
+ return MP_OBJ_NULL;
} else {
// store
return MP_OBJ_NULL; // op not supported
diff --git a/stmhal/mpconfigport.h b/stmhal/mpconfigport.h
index cbdfcf4d07..a70782f6da 100644
--- a/stmhal/mpconfigport.h
+++ b/stmhal/mpconfigport.h
@@ -51,6 +51,7 @@
#define MICROPY_PY_CMATH (1)
#define MICROPY_PY_IO (1)
#define MICROPY_PY_IO_FILEIO (1)
+#define MICROPY_PY_UCTYPES (1)
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (0)