lua-users home
lua-l archive

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


> >   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.