py/qstr: Evaluate find_qstr only once then pass to Q_GET_HASH macro.
Q_GET_HASH may evaluate its argument more than once.
This commit is contained in:
parent
a270cf280b
commit
2b575418b6
@ -251,7 +251,8 @@ qstr qstr_from_strn(const char *str, size_t len) {
|
||||
}
|
||||
|
||||
mp_uint_t qstr_hash(qstr q) {
|
||||
return Q_GET_HASH(find_qstr(q));
|
||||
const byte *qd = find_qstr(q);
|
||||
return Q_GET_HASH(qd);
|
||||
}
|
||||
|
||||
size_t qstr_len(qstr q) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user