On Thu, Mar 20, 2008 at 6:51 AM, Shawn Rutledge <[EMAIL PROTECTED]> wrote: > This is intended to wrap a given Scheme callback as a C function, and > make some C library calls, then under the right conditions, call the > wrapped callback. After several sessions of staring at it, I still > don't understand why this doesn't work. Probably missing something > stupid though. >
That could be called a compiler bug, actually. Moving the define-external form to toplevel will work. The optimizer removes the "msg" argument (since it is not used) but can't (obviously) adjust calls from C to respect that optimization. Since toplevel procedures can not be optimized in such a way (the call sites are unknown), the optimization does not apply. I have added a note in the trunk manual. cheers, felix _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
