py/obj: Add support for __float__ and __complex__ functions.

This commit is contained in:
Andrew Leech
2022-07-04 17:35:46 +10:00
committed by Damien George
parent fa15aed0f7
commit 1e87b56219
9 changed files with 130 additions and 3 deletions

View File

@@ -76,6 +76,8 @@ typedef enum {
MP_UNARY_OP_HASH, // __hash__; must return a small int
MP_UNARY_OP_ABS, // __abs__
MP_UNARY_OP_INT, // __int__
MP_UNARY_OP_FLOAT_MAYBE, // __float__
MP_UNARY_OP_COMPLEX_MAYBE, // __complex__
MP_UNARY_OP_SIZEOF, // for sys.getsizeof()
} mp_unary_op_t;