nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add base_do_block.nit
[nit.git]
/
c_src
/
gc_chooser.c
diff --git
a/c_src/gc_chooser.c
b/c_src/gc_chooser.c
index
5a8cffe
..
f40a23e
100644
(file)
--- a/
c_src/gc_chooser.c
+++ b/
c_src/gc_chooser.c
@@
-25,7
+25,6
@@
enum gc_option { gc_opt_large, gc_opt_malloc, gc_opt_boehm } gc_option;
#ifdef WITH_LIBGC
enum gc_option { gc_opt_large, gc_opt_malloc, gc_opt_boehm } gc_option;
#ifdef WITH_LIBGC
-#define GC_DEBUG
#include <gc/gc.h>
#endif
#include <gc/gc.h>
#endif
@@
-121,3
+120,11
@@
void initialize_gc_option(void) {
default: break; /* Nothing */
}
}
default: break; /* Nothing */
}
}
+
+void gc_register_finalizer(void* obj) {
+#ifdef WITH_LIBGC
+ GC_register_finalizer(obj, &gc_finalize, NULL, NULL, NULL);
+#endif
+}
+
+void __attribute__((weak)) gc_finalize(void *obj, void* client_data) {}