From a3a55e896191815ec721e0f3ed9978178f2a681b Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Wed, 29 Apr 2026 13:44:46 +0800 Subject: [PATCH] fix --- include/pocketpy/objects/object.h | 2 +- src/modules/gc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pocketpy/objects/object.h b/include/pocketpy/objects/object.h index b28eb21d..ec8d065e 100644 --- a/include/pocketpy/objects/object.h +++ b/include/pocketpy/objects/object.h @@ -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; diff --git a/src/modules/gc.c b/src/modules/gc.c index f8c4dfd0..9733e2ff 100644 --- a/src/modules/gc.c +++ b/src/modules/gc.c @@ -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; }