I half-wrote a system for foreign object using finalizers but the manual strongly advises against that...
We could try to use scm_gc_malloc() with boxes or something which would be way cleaner...
heres an example usage of scm_gc_malloc() and scm_gc_malloc_pointerless(): https://www.gnu.org/software/guile/manual/guile.html#Creating-Foreign-Objects
I half-wrote a system for foreign object using finalizers but the manual strongly advises against that...
We could try to use
scm_gc_malloc()with boxes or something which would be way cleaner...heres an example usage of
scm_gc_malloc()andscm_gc_malloc_pointerless(): https://www.gnu.org/software/guile/manual/guile.html#Creating-Foreign-Objects