Skip to content

Commit 20e26c8

Browse files
committed
Fix: did not set value to storage
1 parent 3941968 commit 20e26c8

File tree

1 file changed

+4
-3
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy

1 file changed

+4
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyContext.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,11 +1477,12 @@ public final int ctxSetItem(long hSequence, long hKey, long hValue) {
14771477
}
14781478

14791479
if (dictStorage instanceof HashMapStorage) {
1480-
((HashMapStorage) dictStorage).put((String) key, null);
1480+
((HashMapStorage) dictStorage).put((String) key, value);
1481+
return 0;
14811482
}
1482-
} else {
1483-
dict.setDictStorage(HashingStorageLibrary.getUncached().setItem(dictStorage, key, value));
1483+
// fall through to generic case
14841484
}
1485+
dict.setDictStorage(HashingStorageLibrary.getUncached().setItem(dictStorage, key, value));
14851486
return 0;
14861487
} else if (clazz == PythonBuiltinClassType.PList && PGuards.isInteger(key) && ctxListSetItem(receiver, ((Number) key).longValue(), hValue)) {
14871488
return 0;

0 commit comments

Comments
 (0)