lua-users home
lua-l archive

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


On Thu, Aug 4, 2011 at 00:21, steve donovan <steve.j.donovan@gmail.com> wrote:
> On Wed, Aug 3, 2011 at 10:48 PM, Luiz Henrique de Figueiredo
> <lhf@tecgraf.puc-rio.br> wrote:
>> #define luaL_reg luaL_Reg
>
> In fact, no rebuilding necessary - just put that #define in lfs.c and
> then either
> (a) accept that there is no longer a global 'lfs' table
> (b) write a little bit of C that makes the global 'lfs' table for compatibility
>
> (a) is easy to live with, I think; most of us tend to do this anyway:
>
> local lfs = require 'lfs'
>
> steve d.
>
>

Using a local like that is good practice, but in this case, you could
even just drop the "local" keyword and there you go, your old scripts
that depended on the global work again. No C hacking necessary.

-- 
Sent from my toaster.