diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-31 22:57:56 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-31 22:57:56 +0100 |
commit | e44d26ae0c1b5d248fa4db112cdeabe404944f3c (patch) | |
tree | 03bad17caf73555d5880263e894b5dc2fdb5dbe2 /py/runtime.h | |
parent | 4db727afea0082780fca558ff251afb4a8b32ad7 (diff) | |
download | micropython-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.h | 1 |
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); |