Return assigned values in list.__setitem__/dict.__setitem__
This commit is contained in:
parent
c8b1df7056
commit
8fb1689e1d
@ -59,6 +59,7 @@ KRK_METHOD(dict,__getitem__,{
|
||||
KRK_METHOD(dict,__setitem__,{
|
||||
METHOD_TAKES_EXACTLY(2);
|
||||
krk_tableSet(&self->entries, argv[1], argv[2]);
|
||||
return argv[2];
|
||||
})
|
||||
|
||||
KRK_METHOD(dict,__or__,{
|
||||
|
@ -64,6 +64,7 @@ KRK_METHOD(list,__setitem__,{
|
||||
LIST_WRAP_INDEX();
|
||||
self->values.values[index] = argv[2];
|
||||
if (vm.globalFlags & KRK_GLOBAL_THREADS) pthread_rwlock_unlock(&self->rwlock);
|
||||
return argv[2];
|
||||
})
|
||||
|
||||
KRK_METHOD(list,__eq__,{
|
||||
|
Loading…
Reference in New Issue
Block a user