This commit is contained in:
blueloveTH 2026-04-29 13:44:46 +08:00
parent 65c80a5671
commit a3a55e8961
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
typedef struct PyObject {
py_Type type; // we have a duplicated type here for convenience
uint8_t size_8b;
uint8_t gc_marked; // lsb (self is marked), 2nd lsb (ignore children)
uint8_t gc_marked; // lsb (self is marked), 2nd lsb (no recursively mark)
int slots; // number of slots in the object
char flex[];
} PyObject;

View File

@ -54,7 +54,7 @@ static bool gc_is_tracked(int argc, py_Ref argv) {
py_newbool(py_retval(), false);
return true;
}
bool res = argv->_obj->gc_marked &= 0b10;
bool res = argv->_obj->gc_marked & 0b10;
py_newbool(py_retval(), res);
return true;
}