summaryrefslogtreecommitdiff
path: root/py/objnone.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/objnone.c')
-rw-r--r--py/objnone.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/objnone.c b/py/objnone.c
index da1031835..271a8543f 100644
--- a/py/objnone.c
+++ b/py/objnone.c
@@ -28,9 +28,11 @@
#include "py/obj.h"
+#if !MICROPY_OBJ_IMMEDIATE_OBJS
typedef struct _mp_obj_none_t {
mp_obj_base_t base;
} mp_obj_none_t;
+#endif
STATIC void none_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
(void)self_in;
@@ -48,4 +50,6 @@ const mp_obj_type_t mp_type_NoneType = {
.unary_op = mp_generic_unary_op,
};
+#if !MICROPY_OBJ_IMMEDIATE_OBJS
const mp_obj_none_t mp_const_none_obj = {{&mp_type_NoneType}};
+#endif