kopia lustrzana https://github.com/micropython/micropython
py/qstr: Evaluate find_qstr only once then pass to Q_GET_HASH macro.
Q_GET_HASH may evaluate its argument more than once.pull/4530/head
rodzic
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) {
|
||||
|
|
Ładowanie…
Reference in New Issue