summaryrefslogtreecommitdiffstatshomepage
path: root/py/obj.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-02-27 22:48:25 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-03-03 11:42:53 +0800
commitd86d22e1e7db19c4b50d92862f8eb0a430d64444 (patch)
tree5f831b1885b205510b52431b176f72b7f7918397 /py/obj.h
parentd08fd6866462a4544a938773285b18ab4d7d0970 (diff)
downloadmicropython-d86d22e1e7db19c4b50d92862f8eb0a430d64444.tar.gz
micropython-d86d22e1e7db19c4b50d92862f8eb0a430d64444.zip
Add mp_obj_is_subclass_fast() - intended for fast argument checking.
I.e. as replacement of MP_OBJ_IS_TYPE(), which takes into account subclassing.
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/py/obj.h b/py/obj.h
index c7ffb4619c..855b151506 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -256,6 +256,8 @@ mp_obj_t mp_obj_new_module(qstr module_name);
mp_obj_type_t *mp_obj_get_type(mp_obj_t o_in);
const char *mp_obj_get_type_str(mp_obj_t o_in);
bool mp_obj_is_subclass(mp_obj_t object, mp_obj_t classinfo);
+// Without supefluous arg checking
+bool mp_obj_is_subclass_fast(mp_obj_t object, mp_obj_t classinfo);
void mp_obj_print_helper(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t o_in, mp_print_kind_t kind);
void mp_obj_print(mp_obj_t o, mp_print_kind_t kind);