[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: small error in lua 5.2 beta document
- From: Rob Kendrick <rjek@...>
- Date: Tue, 9 Aug 2011 08:13:41 +0100
On Tue, Aug 09, 2011 at 02:46:24PM +0800, 云风 wrote:
> int lua_yieldk (lua_State *L, int nresults, int ctx, lua_CFunction k);
> Yields a coroutine.
>
> This function should only be called as the return expression of a C
> function, as follows:
>
> ---> return lua_yield (L, nresults, i, k);
>
> I guess it should be
>
> return lua_yieldk(L, n results, i, k);
Why? This would cause a parse error in C, because variable names cannot
have spaces in them. 'nresults' is a perfectly valid and clear name.
B.