[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Disabling initialization env-vars lookup
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 27 Jul 2011 15:51:29 -0300
> > Your best bet is to comment out the body of the handle_luainit()
> > function
> >(in lua.c) and comment out the two calls to setpath() in loadlib.c.
Actually, you could do this in luaconf.h:
#if defined(lua_c) || defined(loadlib_c)
#define getenv(x) NULL
#endf
and not bother about the paths.
Of course, this disables getenv so you won't be able to use this trick
if you use getenv for other purposes in lua.c or loadlib.c.
Also, be aware that even if you disable the paths, Lua will use the
default paths in LUA_PATH_DEFAULT and LUA_CPATH_DEFAULT.