summaryrefslogtreecommitdiffstatshomepage
path: root/py/runtime0.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2018-08-29 17:59:36 +0300
committerDamien George <damien.p.george@gmail.com>2018-12-07 17:28:04 +1100
commitb1d08726eeeadf0b91358cc8c46e156695b6a9c0 (patch)
treea8d8235ef2738961eab0ca0c2da74e85ecef861d /py/runtime0.h
parent113f00a9ab469a83d1004dac502077af0a8f4847 (diff)
downloadmicropython-b1d08726eeeadf0b91358cc8c46e156695b6a9c0.tar.gz
micropython-b1d08726eeeadf0b91358cc8c46e156695b6a9c0.zip
py/obj: Add support for __int__ special method.
Based on the discussion, this special method is available unconditionally, as converting to int is a common operation.
Diffstat (limited to 'py/runtime0.h')
-rw-r--r--py/runtime0.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime0.h b/py/runtime0.h
index 56cc6cfd37..efd439196c 100644
--- a/py/runtime0.h
+++ b/py/runtime0.h
@@ -61,6 +61,7 @@ typedef enum {
MP_UNARY_OP_LEN, // __len__
MP_UNARY_OP_HASH, // __hash__; must return a small int
MP_UNARY_OP_ABS, // __abs__
+ MP_UNARY_OP_INT, // __int__
MP_UNARY_OP_SIZEOF, // for sys.getsizeof()
MP_UNARY_OP_NUM_RUNTIME,