diff options
author | Josh Lloyd <j.nevercast@gmail.com> | 2019-09-25 17:53:30 +1200 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-09-26 16:04:56 +1000 |
commit | 7d58a197cffa7c0dd3686402d2e381812bb8ddeb (patch) | |
tree | 5cdf657c988c65f7ada0a5b489220d51849b189f /py/objstr.c | |
parent | b596638b9b28975adee4a06a92497b5d9dbba34c (diff) |
py: Rename MP_QSTR_NULL to MP_QSTRnull to avoid intern collisions.
Fixes #5140.
Diffstat (limited to 'py/objstr.c')
-rw-r--r-- | py/objstr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/py/objstr.c b/py/objstr.c index 1047ea94c..882436363 100644 --- a/py/objstr.c +++ b/py/objstr.c @@ -169,7 +169,7 @@ mp_obj_t mp_obj_str_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_ // Check if a qstr with this data already exists qstr q = qstr_find_strn((const char*)str_data, str_len); - if (q != MP_QSTR_NULL) { + if (q != MP_QSTRnull) { return MP_OBJ_NEW_QSTR(q); } @@ -2042,7 +2042,7 @@ mp_obj_t mp_obj_new_str_from_vstr(const mp_obj_type_t *type, vstr_t *vstr) { // if not a bytes object, look if a qstr with this data already exists if (type == &mp_type_str) { qstr q = qstr_find_strn(vstr->buf, vstr->len); - if (q != MP_QSTR_NULL) { + if (q != MP_QSTRnull) { vstr_clear(vstr); vstr->alloc = 0; return MP_OBJ_NEW_QSTR(q); @@ -2067,7 +2067,7 @@ mp_obj_t mp_obj_new_str_from_vstr(const mp_obj_type_t *type, vstr_t *vstr) { mp_obj_t mp_obj_new_str(const char* data, size_t len) { qstr q = qstr_find_strn(data, len); - if (q != MP_QSTR_NULL) { + if (q != MP_QSTRnull) { // qstr with this data already exists return MP_OBJ_NEW_QSTR(q); } else { |