mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 11:30:18 +00:00
fix all
This commit is contained in:
parent
a21765a9ca
commit
6b592b11df
@ -84,7 +84,8 @@ static bool disassemble(CodeObject* co) {
|
||||
case OP_BEGIN_CLASS:
|
||||
case OP_DELETE_GLOBAL:
|
||||
case OP_STORE_CLASS_ATTR: {
|
||||
pk_sprintf(&ss, " (%n)", byte.arg);
|
||||
py_Name name = c11__getitem(py_Name, &co->names, byte.arg);
|
||||
pk_sprintf(&ss, " (%n)", name);
|
||||
break;
|
||||
}
|
||||
case OP_LOAD_FAST:
|
||||
|
@ -53,10 +53,10 @@ static bool namedict_items(int argc, py_Ref argv) {
|
||||
NameDict* dict = PyObject__dict(object->_obj);
|
||||
py_newlist(py_retval());
|
||||
for(int i = 0; i < dict->capacity; i++) {
|
||||
py_Ref slot = py_list_emplace(py_retval());
|
||||
py_Ref p = py_newtuple(slot, 2);
|
||||
NameDict_KV* kv = &dict->items[i];
|
||||
if(kv->key == NULL) continue;
|
||||
py_Ref slot = py_list_emplace(py_retval());
|
||||
py_Ref p = py_newtuple(slot, 2);
|
||||
p[0] = *py_name2ref(kv->key);
|
||||
p[1] = kv->value;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user