summaryrefslogtreecommitdiff
path: root/py/vm.c
diff options
context:
space:
mode:
authorstijn <stinos@zoho.com>2015-02-14 18:43:54 +0100
committerDamien George <damien.p.george@gmail.com>2015-03-26 23:55:14 +0000
commit28fa84b4454ef253dfba5f1ceb023be2184a7271 (patch)
tree628ba6762450f90282c305eb0b8f4bc5dde8778e /py/vm.c
parentc260836beb10b1d81c98732c2b7282eb6675140a (diff)
py: Add optional support for descriptors' __get__ and __set__ methods.
Disabled by default. Enabled on unix and windows ports.
Diffstat (limited to 'py/vm.c')
-rw-r--r--py/vm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/py/vm.c b/py/vm.c
index ee218694c..29a9e4f6d 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -393,8 +393,9 @@ dispatch_loop:
DISPATCH();
}
#else
- // This caching code works with MICROPY_PY_BUILTINS_PROPERTY enabled because
- // if the attr exists in self->members then it can't be a property. A
+ // This caching code works with MICROPY_PY_BUILTINS_PROPERTY and/or
+ // MICROPY_PY_DESCRIPTORS enabled because if the attr exists in
+ // self->members then it can't be a property or have descriptors. A
// consequence of this is that we can't use MP_MAP_LOOKUP_ADD_IF_NOT_FOUND
// in the fast-path below, because that store could override a property.
ENTRY(MP_BC_STORE_ATTR): {