summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
authorDan Halbert <halbert@adafruit.com>2019-06-11 17:43:22 -0400
committerGitHub <noreply@github.com>2019-06-11 17:43:22 -0400
commit541c2a70acab02c419f1ddd4a0ffc38c23a054a0 (patch)
tree7829990c07bbd80c490bc03508d6e0d1c25e166b /py
parentc85e111675ccfb0c03aa06bd3461f5a3c026ec87 (diff)
parent4fc189b60c800f097db55c16768fa8c73eb72ccf (diff)
Merge pull request #1938 from dhalbert/4.0.x-merge-to-master-2019-06-11
Merge latest 4.0.x changes to master
Diffstat (limited to 'py')
-rw-r--r--py/circuitpy_defns.mk5
-rwxr-xr-xpy/gc.c4
-rw-r--r--py/gc.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk
index 722f06e93..28d90dfea 100644
--- a/py/circuitpy_defns.mk
+++ b/py/circuitpy_defns.mk
@@ -366,3 +366,8 @@ $(addprefix lib/,\
libm/atan2f.c \
)
endif
+
+.PHONY: check-release-needs-clean-build
+
+check-release-needs-clean-build:
+ @echo "RELEASE_NEEDS_CLEAN_BUILD = $(RELEASE_NEEDS_CLEAN_BUILD)"
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);