diff options
| author | Scott Shawcroft <scott@chickadee.tech> | 2016-09-19 13:32:29 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@chickadee.tech> | 2016-09-19 13:32:29 -0700 |
| commit | bb03afdb77c95b9cb23e531e5763167ccb09c8e4 (patch) | |
| tree | 509722778a03b10c933963a35c93eb5670a5cdb5 /py/objnone.c | |
| parent | 345dd1484c4e68f53ea242c5778a2de99119db9a (diff) | |
| parent | 60592fd23c8acd4ed4f70d8fbe8f8b11ea58082c (diff) | |
Merge remote-tracking branch 'micropython/master'
Diffstat (limited to 'py/objnone.c')
| -rw-r--r-- | py/objnone.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/py/objnone.c b/py/objnone.c index 69eab03fe..5d5b83540 100644 --- a/py/objnone.c +++ b/py/objnone.c @@ -43,20 +43,11 @@ STATIC void none_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_ } } -STATIC mp_obj_t none_unary_op(mp_uint_t op, mp_obj_t o_in) { - (void)o_in; - switch (op) { - case MP_UNARY_OP_BOOL: return mp_const_false; - case MP_UNARY_OP_HASH: return MP_OBJ_NEW_SMALL_INT((mp_uint_t)o_in); - default: return MP_OBJ_NULL; // op not supported - } -} - const mp_obj_type_t mp_type_NoneType = { { &mp_type_type }, .name = MP_QSTR_NoneType, .print = none_print, - .unary_op = none_unary_op, + .unary_op = mp_generic_unary_op, }; const mp_obj_none_t mp_const_none_obj = {{&mp_type_NoneType}}; |
