On Fri Dec 12, 2025 at 8:34 AM CET, Diogo via Chicken-users wrote:
>
> The problem seems to be related to the compute type because I get this error:
>
> % csc fpointer.scm
> Error: during expansion of (crunch ...) - argument type for foreign
> wrapper
> is invalid
> dispatch
> (procedure (integer) integer)
>
> Call history: ...
>
It turns out function-type arguments are not handled yet by the wrapper
generation code, I've added this (see git repo). But note that your
examples won't work, as you pass Scheme/CHICKEN procedures ("impl")
to CRUNCHed code, since the "impl" represents the wrapper, not
the raw function pointer.
cheers,
felix