[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Initial line number for luaL_loadbuffer
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 15 May 2014 21:00:36 -0300
> We would like to suggest the inclusion of the attached patch against
> lua-5.3.0-work2, which adds a new macro named luaL_loadbuffern. It behaves just
> like the - kept for compatibility - luaL_loadbuffer, except that it takes an
> additional integer argument with which the line number counter in the parser is
> initialised.
You don't need to patch Lua. You can simply provide your own reader function
that first sends n newlines and then the actual code. It can be done in Lua
and in C.