summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDan Halbert <halbert@halwitz.org>2019-06-06 17:49:32 -0400
committerDan Halbert <halbert@halwitz.org>2019-06-06 17:49:32 -0400
commit62de2506e47c14a71c7a9fe04360697ccb966aeb (patch)
tree2d6363f88e5d7c4666094138e217ec6a2a2b6b2b /py
parentc90ce2b9fa98dc8c2a1298524bc434d07393ad6a (diff)
Include display objects in gc.
Diffstat (limited to 'py')
-rwxr-xr-xpy/gc.c4
-rw-r--r--py/gc.h1
2 files changed, 5 insertions, 0 deletions
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);