[CM] On FFI bindings

Christos Vagias chris.actondev at gmail.com
Thu Oct 22 06:44:47 PDT 2020


Oh, didn't know about the  (load "libx.so" (inlet 'init_func ....))

My question's focus was the "How one should provide an s7 environment via a
C API"
What I was meaning with this that it'd be nice to have some guidelines for
people making bindings.
But since there's the init_func there's no need for that: one could call
their entrypoint however they wish.

One minor request here: the possibility to have 'init_args apart from the
'init_func:
If init_args are provided the init_func should be called with s7_scheme*
and s7_pointer arguments.
That could enable for example passing an environment where the bindings
should be added, and so on.

Also some other points:
- WITH_C_LOADER doesn't work in Windows
- also doesn't work if compiling with mingw (should check for __MINGW32__
compiler flag)
  stumbled on the problem that couldn't find <dlfcn.h> which is needed when
WITH_C_LOADER (which is set to true #if WITH_GCC, which in turn checks for
__GNUC__ .. which is set in mingw)

If windows is of no priority I could take a look into it myself at some
point (not soon however, I'm in the process of moving)

On Thu, 22 Oct 2020 at 15:01, <bil at ccrma.stanford.edu> wrote:

> To expand slightly on Woody's response, what do you need
> from s7 beyond s7_load_with_environment and s7_autoload?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20201022/70c0cf36/attachment.html>


More information about the Cmdist mailing list