Re: [Chicken-users] Returning a value from foreign-lambda*

2007-09-01 Thread felix winkelmann
On 8/28/07, Zbigniew [EMAIL PROTECTED] wrote: This is strange. What it used to say, at some point, was that the argument to return had to be wrapped in parentheses, i.e. return(x). That's because return() itself is a macro which does all the proper cleanup and calls the current continuation.

[Chicken-users] Returning a value from foreign-lambda*

2007-08-28 Thread Will M Farr
Hello all, In my copy of chicken (SVN, revision 5752), the way to return an object at the end of a foreign-lambda* is by using return(obj). The wiki manual, however, says that I should use C_return(obj), as in (define my-strlen (foreign-lambda* int ((c-string str)) int n = 0;

Re: [Chicken-users] Returning a value from foreign-lambda*

2007-08-28 Thread Zbigniew
This is strange. What it used to say, at some point, was that the argument to return had to be wrapped in parentheses, i.e. return(x). That's because return() itself is a macro which does all the proper cleanup and calls the current continuation. C_return() is just an alias to the return()