From d46183860c1f3f10095e95023adcb79b1896ab0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 22 Mar 2019 20:11:11 +0100 Subject: Move C and Scheme code into subdirs. --- src/guile_interface.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/guile_interface.h (limited to 'src/guile_interface.h') diff --git a/src/guile_interface.h b/src/guile_interface.h new file mode 100644 index 00000000..76ec24d3 --- /dev/null +++ b/src/guile_interface.h @@ -0,0 +1,28 @@ +#ifndef GUILE_INTERFACE_H +#define GUILE_INTERFACE_H + +#include +#include "vcal.h" + +/* + * 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_lib (void); +void init_vcomponent_type (void); + +SCM make_vcomponent (SCM); +SCM vcomponent_get_attribute (SCM, SCM); +SCM vcomponent_child_count (SCM); +SCM vcomponent_children (SCM); +SCM vcomponent_typeof (SCM); + +SCM scm_from_vcomponent (vcomponent*); + +#endif /* GUILE_INTERFACE_H */ -- cgit v1.2.3