Re: Calling back scheme from C

2020-09-22 Thread divoplade
Hello all, It seems that I'm making progress. scm_call_* seems to corrupt something if the value is a lambda calling (use-modules) I tested with srfi srfi-1 or rnrs bytevectors. Without any of them, calling the function and discarding its results does not crash the program. With any or

Re: Calling back scheme from C

2020-09-22 Thread Chris Vine
On Tue, 22 Sep 2020 12:36:15 +0200 divoplade wrote: > Hello, > > Le mardi 22 septembre 2020 à 10:50 +0100, Chris Vine a écrit : > > This may not be your issue. I offer it as something I had to deal > > with > > in code of my own to prevent incorrect collection for closures of > > callbacks

Re: Calling back scheme from C

2020-09-22 Thread divoplade
Hello, Le mardi 22 septembre 2020 à 10:50 +0100, Chris Vine a écrit : > This may not be your issue. I offer it as something I had to deal > with > in code of my own to prevent incorrect collection for closures of > callbacks executed by a C event loop. It does not seem to fix it on my side.

Re: Calling back scheme from C

2020-09-22 Thread Chris Vine
On Tue, 22 Sep 2020 08:25:25 +0200 divoplade wrote: > Hello guile, > > I am having a hard time understanding what I do wrong when trying to > pass a guile function as a C callback (from C). > > You should be able to trigger the bug by saving the 3 attached files > and running: > > guix