From 1e1961c0a28093585be4934fcc7e62ca9116810f Mon Sep 17 00:00:00 2001 From: Keegan McAllister Date: Thu, 23 Oct 2014 17:32:28 -0700 Subject: [PATCH] Allow the user to set their own GC callback --- src/rust.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rust.rs b/src/rust.rs index 9ac226c6a..ef00d1101 100644 --- a/src/rust.rs +++ b/src/rust.rs @@ -57,7 +57,8 @@ impl RtUtils for rc::Rc { } } -unsafe extern fn gc_callback(rt: *mut JSRuntime, _status: JSGCStatus) { +/// If you set your own callback, the first step should be a call to this one. +pub unsafe extern fn gc_callback(rt: *mut JSRuntime, _status: JSGCStatus) { use std::rt::local::Local; use std::rt::task::Task; unsafe {