lua-users home
lua-l archive

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


It was thus said that the Great Lorenzo Donati once stated:
> For example, if I wanted to avoid Lua from running the initialization 
> code specified by LUA_INIT, would it be enough to modify luaconf.h so 
> that the line:
> 
> #define LUA_INIT	"LUA_INIT"
> 
> is removed? Or should I define that macro as an empty string:
> 
> #define LUA_INIT	""

  I'm not sure if that's a good idea; you'd have to check the code around
the calls to getenv() to see if that would cause more bugs (at first blush,
I don't see how it could, but better to be safe than sorry).

> or neither will do and I should mess more deeply with the source code to 
> achieve what I want.

  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.  

  -spc