aboutsummaryrefslogtreecommitdiff
path: root/py/objtype.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2015-04-01 14:10:50 +0000
committerDamien George <damien.p.george@gmail.com>2015-04-11 16:54:37 +0100
commitb1bbe966c408901ae64ea8c8b468694c47d05b1a (patch)
tree46025c34daf602aeb1e8def41d1e01f0750b6d13 /py/objtype.h
parentd07ccc5a394d0252ffbc227509ed2134465c215a (diff)
py: Combine load_attr and store_attr type methods into one (attr).
This simplifies the API for objects and reduces code size (by around 400 bytes on Thumb2, and around 2k on x86). Performance impact was measured with Pystone score, but change was barely noticeable.
Diffstat (limited to 'py/objtype.h')
-rw-r--r--py/objtype.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/py/objtype.h b/py/objtype.h
index 176e802d2..de1909b1e 100644
--- a/py/objtype.h
+++ b/py/objtype.h
@@ -37,9 +37,8 @@ typedef struct _mp_obj_instance_t {
// TODO maybe cache __getattr__ and __setattr__ for efficient lookup of them
} mp_obj_instance_t;
-// these need to be exposed for MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE to work
-void mp_obj_instance_load_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest);
-bool mp_obj_instance_store_attr(mp_obj_t self_in, qstr attr, mp_obj_t value);
+// this needs to be exposed for MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE to work
+void mp_obj_instance_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest);
// these need to be exposed so mp_obj_is_callable can work correctly
bool mp_obj_instance_is_callable(mp_obj_t self_in);