py/modsys: Initial implementation of sys.getsizeof().

Implemented as a new MP_UNARY_OP. This patch adds support lists, dicts and
instances.
This commit is contained in:
Paul Sokolovsky
2017-08-11 09:42:39 +03:00
parent 7d4a2f773c
commit bfc2092dc5
8 changed files with 49 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ typedef enum {
MP_UNARY_OP_NEGATIVE,
MP_UNARY_OP_INVERT,
MP_UNARY_OP_NOT,
MP_UNARY_OP_SIZEOF, // for sys.getsizeof()
} mp_unary_op_t;
typedef enum {