From b99692e7b9c66d0ae692fa4212471277a24251a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 25 Feb 2019 23:45:49 +0100 Subject: Add GC guards. --- guile_interface.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'guile_interface.h') diff --git a/guile_interface.h b/guile_interface.h index 4864407f..3776d88c 100644 --- a/guile_interface.h +++ b/guile_interface.h @@ -3,7 +3,15 @@ #include -#define SCM_IS_LIST(x) scm_is_true(scm_list_p(x)) +/* + * At a number of places scm_gc_{un,}protect_object is called. + * This is needed since most of my structures are allocated with the + * regular malloc, instead of the scm_gc_malloc variants. + * This leads to the garbage collector not realizing that I still have + * the components, and deletes them. + * + * The protection markers stop the GC from doing its thing. + */ void init_vcomponent (); void init_vcomponent_type (void); -- cgit v1.2.3