Re: Passing function pointer to crunch via chicken
Felix Winkelmann via Chicken-users <[email protected]> Sat, 13 Dec 2025 15:41:57 +0100
| Newsgroups | gmane.lisp.scheme.chicken |
|---|---|
| Message-ID | <[email protected]> |
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