diff options
| author | Damien George <damien@micropython.org> | 2022-08-11 16:34:02 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-08-11 23:18:02 +1000 |
| commit | 82b3500724206f2baa342a3559bbe716e9819426 (patch) | |
| tree | 45e04bb190754e77871ff645acce5c2b28a47420 /py/qstr.h | |
| parent | 94a19f10628f9c3a9978daae9f6f4c7ac352e9a2 (diff) | |
py/qstr: Change qstr hash type from mp_uint_t to size_t.
The hash is either 8 or 16 bits (depending on MICROPY_QSTR_BYTES_IN_HASH)
so will fit in a size_t.
This saves 268 bytes on the unix nanbox build. Non-nanbox configurations
are unchanged because mp_uint_t is the same size as size_t.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/qstr.h')
| -rw-r--r-- | py/qstr.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -78,7 +78,7 @@ typedef struct _qstr_pool_t { void qstr_init(void); -mp_uint_t qstr_compute_hash(const byte *data, size_t len); +size_t qstr_compute_hash(const byte *data, size_t len); qstr qstr_find_strn(const char *str, size_t str_len); // returns MP_QSTRnull if not found qstr qstr_from_str(const char *str); |
