소스 검색

fix a bug

blueloveTH 2 년 전
부모
커밋
01fecaa352
1개의 변경된 파일과 2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      include/pocketpy/frame.h

+ 2 - 0
include/pocketpy/frame.h

@@ -122,6 +122,8 @@ struct Frame {
     void _gc_mark() const {
     void _gc_mark() const {
         PK_OBJ_MARK(_module);
         PK_OBJ_MARK(_module);
         co->_gc_mark();
         co->_gc_mark();
+        // Frame could be stored in a generator, so mark _callable for safety
+        if(_callable != nullptr) PK_OBJ_MARK(_callable);
     }
     }
 };
 };