summaryrefslogtreecommitdiffstats
path: root/byterun/roots.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/roots.c')
-rw-r--r--byterun/roots.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/byterun/roots.c b/byterun/roots.c
index a9dfd2065..055b7c763 100644
--- a/byterun/roots.c
+++ b/byterun/roots.c
@@ -44,6 +44,22 @@ void register_global_root(r)
global_roots = gr;
}
+/* Un-register a global C root */
+
+void remove_global_root(r)
+ value * r;
+{
+ struct global_root ** gp, * gr;
+ for (gp = &global_roots; *gp != NULL; gp = &(*gp)->next) {
+ gr = *gp;
+ if (gr->root == r) {
+ *gp = gr->next;
+ stat_free((char *) gr);
+ return;
+ }
+ }
+}
+
/* Call [oldify] on all roots except [global_data] */
void oldify_local_roots ()