Open Javyre opened 6 years ago
According to guile guys, finalizers are fine since we need destructors when dropping rust objects... Ill start working on the seconds half of the impl
Well, I successfully implemented foreign objects pretty cleanly with only one slot... still waiting on response from guile-user: https://lists.gnu.org/archive/html/guile-user/2018-02/msg00003.html
Left a lot of the old Typelist
code commented out in the commit since I don't know if this is the definitive solution... Still no response from mailing list... 😢
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 ofscm_gc_malloc()
andscm_gc_malloc_pointerless()
: https://www.gnu.org/software/guile/manual/guile.html#Creating-Foreign-Objects