summaryrefslogtreecommitdiff
path: root/py/obj.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-21 13:15:21 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-21 13:20:12 +1100
commit9344e876bb40d2cb759fc8318626952473a4be58 (patch)
tree98ef851a0ff797970d90499992068f3a8f3f7751 /py/obj.h
parentd3b2c6e44c25ef6714d767e4da4e808a7ba80f23 (diff)
py/objtype: Allow mp_instance_cast_to_native_base to take native obj.
And rename it to mp_obj_cast_to_native_base() to indicate this. This allows users of this function to easily support native and native-subclass objects in the same way (by just passing the object through this function).
Diffstat (limited to 'py/obj.h')
-rw-r--r--py/obj.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/obj.h b/py/obj.h
index 53cefb01d..3e910ebd5 100644
--- a/py/obj.h
+++ b/py/obj.h
@@ -728,7 +728,7 @@ mp_obj_t mp_obj_new_memoryview(byte typecode, size_t nitems, void *items);
const mp_obj_type_t *mp_obj_get_type(mp_const_obj_t o_in);
const char *mp_obj_get_type_str(mp_const_obj_t o_in);
bool mp_obj_is_subclass_fast(mp_const_obj_t object, mp_const_obj_t classinfo); // arguments should be type objects
-mp_obj_t mp_instance_cast_to_native_base(mp_const_obj_t self_in, mp_const_obj_t native_type);
+mp_obj_t mp_obj_cast_to_native_base(mp_obj_t self_in, mp_const_obj_t native_type);
void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind);
void mp_obj_print(mp_obj_t o, mp_print_kind_t kind);