Skip to content
Snippets Groups Projects
Commit 2b575418 authored by Damien George's avatar Damien George
Browse files

py/qstr: Evaluate find_qstr only once then pass to Q_GET_HASH macro.

Q_GET_HASH may evaluate its argument more than once.
parent a270cf28
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment