mirror of
https://github.com/pocketpy/pocketpy
synced 2026-05-06 18:23:38 +00:00
Update ceval.c
This commit is contained in:
parent
811755f924
commit
fbc157a41c
@ -539,11 +539,15 @@ __NEXT_STEP:
|
||||
DISPATCH();
|
||||
}
|
||||
case OP_BUILD_TUPLE: {
|
||||
bool need_track = false;
|
||||
py_TValue tmp;
|
||||
py_Ref p = py_newtuple(&tmp, byte.arg);
|
||||
py_TValue* begin = SP() - byte.arg;
|
||||
for(int i = 0; i < byte.arg; i++)
|
||||
for(int i = 0; i < byte.arg; i++) {
|
||||
p[i] = begin[i];
|
||||
if(p[i].is_ptr) need_track = true;
|
||||
}
|
||||
if(!need_track) tmp._obj->gc_marked |= 0b10;
|
||||
SP() = begin;
|
||||
PUSH(&tmp);
|
||||
DISPATCH();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user