Skip to content

Commit a8775aa

Browse files
committed
py/qstr: Add QSTR_TOTAL() macro to get number of qstrs.
1 parent 2a0cbc0 commit a8775aa

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

py/qstr.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ typedef struct _qstr_pool_t {
5656
} qstr_pool_t;
5757

5858
#define QSTR_FROM_STR_STATIC(s) (qstr_from_strn((s), strlen(s)))
59+
#define QSTR_TOTAL() (MP_STATE_VM(last_pool)->total_prev_len + MP_STATE_VM(last_pool)->len)
5960

6061
void qstr_init(void);
6162

0 commit comments

Comments
 (0)