lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Tue, Aug 09, 2011 at 09:56:27AM +0200, Dirk Laurie wrote:
> On Tue, Aug 09, 2011 at 09:13:41AM +0200, Rob Kendrick wrote:
> > 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.
> > 
> 云风's point is that `lua_yield` should be `lua_yieldk`.
> The extra space is a typo.

Ah!  One should be careful when reporting typos that ones correction
doesn't include another :)

B.