more fix...

This commit is contained in:
blueloveTH 2023-08-13 02:21:28 +08:00
parent c9ace234cc
commit 7f3d89b264
2 changed files with 2 additions and 2 deletions

View File

@ -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{ \

View File

@ -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{