diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-25 23:45:49 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-25 23:45:49 +0100 |
commit | b99692e7b9c66d0ae692fa4212471277a24251a2 (patch) | |
tree | a91dd7e3faf1ad55926d2afdc6ac6c1d69c0468c /guile_interface.h | |
parent | Add scm field to strbuf. (diff) | |
download | calp-b99692e7b9c66d0ae692fa4212471277a24251a2.tar.gz calp-b99692e7b9c66d0ae692fa4212471277a24251a2.tar.xz |
Add GC guards.
Diffstat (limited to 'guile_interface.h')
-rw-r--r-- | guile_interface.h | 10 |
1 files changed, 9 insertions, 1 deletions
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 <libguile.h> -#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); |