summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-03-31 22:57:56 +0100
committerDamien George <damien.p.george@gmail.com>2014-03-31 22:57:56 +0100
commite44d26ae0c1b5d248fa4db112cdeabe404944f3c (patch)
tree03bad17caf73555d5880263e894b5dc2fdb5dbe2 /py/runtime.h
parent4db727afea0082780fca558ff251afb4a8b32ad7 (diff)
downloadmicropython-e44d26ae0c1b5d248fa4db112cdeabe404944f3c.tar.gz
micropython-e44d26ae0c1b5d248fa4db112cdeabe404944f3c.zip
py: Implement __getattr__.
It's not completely satisfactory, because a failed call to __getattr__ should not raise an exception. __setattr__ could be implemented, but it would slow down all stores to a user created object. Need to implement some caching system.
Diffstat (limited to 'py/runtime.h')
-rw-r--r--py/runtime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.h b/py/runtime.h
index b817d61aec..b233d23b4a 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -46,6 +46,7 @@ void mp_unpack_sequence(mp_obj_t seq, uint num, mp_obj_t *items);
mp_obj_t mp_store_map(mp_obj_t map, mp_obj_t key, mp_obj_t value);
mp_obj_t mp_load_attr(mp_obj_t base, qstr attr);
void mp_load_method(mp_obj_t base, qstr attr, mp_obj_t *dest);
+void mp_load_method_maybe(mp_obj_t base, qstr attr, mp_obj_t *dest);
void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t val);
void mp_store_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t val);