summaryrefslogtreecommitdiff
path: root/py/obj.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-11 19:22:29 +0000
committerDamien George <damien.p.george@gmail.com>2014-01-11 19:22:29 +0000
commiteae16445d5f6ca4bcd693422fc93ccf4fd7e215e (patch)
treec07206dcad354d366c1a42d6fa81d6a1868de2e1 /py/obj.c
parentbcbeea0a477ed977a668e67f6f5402260d26ceb9 (diff)
py: Implement staticmethod and classmethod (internally).
Still need to make built-ins by these names, and write tests.
Diffstat (limited to 'py/obj.c')
-rw-r--r--py/obj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/obj.c b/py/obj.c
index dfb450fb8..81b5c69f7 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -231,7 +231,7 @@ uint mp_get_index(const mp_obj_type_t *type, machine_uint_t len, mp_obj_t index)
}
}
-// may return NULL
+// may return MP_OBJ_NULL
mp_obj_t mp_obj_len_maybe(mp_obj_t o_in) {
mp_small_int_t len = 0;
if (MP_OBJ_IS_TYPE(o_in, &str_type)) {
@@ -249,7 +249,7 @@ mp_obj_t mp_obj_len_maybe(mp_obj_t o_in) {
} else if (MP_OBJ_IS_TYPE(o_in, &dict_type)) {
len = mp_obj_dict_len(o_in);
} else {
- return NULL;
+ return MP_OBJ_NULL;
}
return MP_OBJ_NEW_SMALL_INT(len);
}