[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] foreign-lambda*
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] foreign-lambda* |
Date: |
Thu, 3 Feb 2005 00:32:18 -0800 |
You can overcome the 126 argument-limit by using the currrent
darcs version of Chicken. You need libffi installed and configure
with --enable-libffi. This allows you up to 1000 arguments.
cheers,
felix
On Wed, 02 Feb 2005 09:06:22 -0800 (PST), Nicolas Pelletier
<address@hidden> wrote:
> felix winkelmann <address@hidden> writes:
>
> >
> > Oh, just in case: if the computed string can be created at compile-time,
> > you can of course use a macro that subsequently expands into
> > a foreign-lambda*. But if you create the code at run-time, then of course
> > an embedded C-compiler is needed.
>
> Yes, and I tried to remain on the compile-time side of things. But I
> would then have some foreign-lambda* procedures with more than 126
> parameters, breaking the limit. So I end up hardcoding values inside
> the C body of the foreign-lambda*, and these values come from run-time
> parameters to my Scheme code...
>
> The reason I can break the 126 parameters limit is I am using
> foreign-lambda* to fill in huge C structures, some of them including
> big tables of other structures... and every field therein must get an
> init value.
>
> And this stacking of structures of structures of tables of whatever
> makes foreign-parse choke (It needs more C preprocessing than what the
> easy FFI currently provides).
>
> The above may sound a bit sad, but the truth is chicken is really
> helping me.
>
> --
> Nicolas
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users
>