mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-21 03:50:16 +00:00
more fix...
This commit is contained in:
parent
c9ace234cc
commit
7f3d89b264
@ -32,7 +32,7 @@ struct NameDictImpl {
|
||||
#define HASH_PROBE(key, ok, i) \
|
||||
ok = false; \
|
||||
i = _hash(key, _mask, _hash_seed); \
|
||||
while(true) { \
|
||||
for(int _j=0; _j<_capacity; _j++) { \
|
||||
if(!_items[i].first.empty()){ \
|
||||
if(_items[i].first == (key)) { ok = true; break; } \
|
||||
}else{ \
|
||||
|
@ -1036,7 +1036,7 @@ void Dict::_probe(PyObject *key, bool &ok, int &i) const{
|
||||
i64 hash = vm->py_hash(key);
|
||||
i = hash & _mask;
|
||||
// std::cout << CAST(Str, vm->py_repr(key)) << " " << hash << " " << i << std::endl;
|
||||
while(true) {
|
||||
for(int j=0; j<_capacity; j++) {
|
||||
if(_items[i].first != nullptr){
|
||||
if(vm->py_equals(_items[i].first, key)) { ok = true; break; }
|
||||
}else{
|
||||
|
Loading…
x
Reference in New Issue
Block a user