From 62de2506e47c14a71c7a9fe04360697ccb966aeb Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 6 Jun 2019 17:49:32 -0400 Subject: Include display objects in gc. --- py/gc.c | 4 ++++ py/gc.h | 1 + 2 files changed, 5 insertions(+) (limited to 'py') diff --git a/py/gc.c b/py/gc.c index e9b85fa7c..10b36950c 100755 --- a/py/gc.c +++ b/py/gc.c @@ -383,6 +383,10 @@ void gc_collect_start(void) { #endif } +void gc_collect_ptr(void *ptr) { + gc_mark(ptr); +} + void gc_collect_root(void **ptrs, size_t len) { for (size_t i = 0; i < len; i++) { void *ptr = ptrs[i]; diff --git a/py/gc.h b/py/gc.h index 757a2a6e0..02bf45158 100644 --- a/py/gc.h +++ b/py/gc.h @@ -43,6 +43,7 @@ bool gc_is_locked(void); // A given port must implement gc_collect by using the other collect functions. void gc_collect(void); void gc_collect_start(void); +void gc_collect_ptr(void *ptr); void gc_collect_root(void **ptrs, size_t len); void gc_collect_end(void); -- cgit v1.2.3