summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
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/mpconfig.h
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/mpconfig.h')
-rw-r--r--py/mpconfig.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 094d8d78a..ae5e77625 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -364,6 +364,12 @@ typedef double mp_float_t;
#define MICROPY_PY_FUNCTION_ATTRS (0)
#endif
+// Whether to support descriptors (__get__ and __set__)
+// This costs some code size and makes all load attrs and store attrs slow
+#ifndef MICROPY_PY_DESCRIPTORS
+#define MICROPY_PY_DESCRIPTORS (0)
+#endif
+
// Whether str object is proper unicode
#ifndef MICROPY_PY_BUILTINS_STR_UNICODE
#define MICROPY_PY_BUILTINS_STR_UNICODE (0)