diff options
Diffstat (limited to 'etc/noparser.c')
| -rw-r--r-- | etc/noparser.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/noparser.c b/etc/noparser.c index dc58faff..9396ad60 100644 --- a/etc/noparser.c +++ b/etc/noparser.c @@ -4,9 +4,12 @@ * You'll only be able to load binary files and strings, precompiled with luac. * (Of course, you'll have to build luac with the original parsing modules!) * -* To use this module, simply compile it ("make noparser" does that) and -* list its object file before the Lua libraries. The linker should then not -* load the parsing modules. To try it, do "make luab". +* To use this module, simply compile it ("make noparser" does that) and list +* its object file before the Lua libraries. The linker should then not load +* the parsing modules. To try it, do "make luab". +* +* If you also want to avoid the dump module (ldump.o), define NODUMP. +* #define NODUMP */ #define LUA_CORE @@ -22,22 +25,18 @@ void luaX_init (lua_State *L) { Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { UNUSED(z); UNUSED(buff); - lua_pushstring(L,"parser not loaded"); + lua_pushliteral(L,"parser not loaded"); lua_error(L); return NULL; } -/* -* If you also want to avoid the dump module, ldump.o, enable the code below. -*/ -#define NODUMP #ifdef NODUMP #include "lundump.h" int luaU_dump (lua_State* L, const Proto* Main, lua_Chunkwriter w, void* data, int strip) { return 0; - lua_pushstring(L,"dumper not loaded"); + lua_pushliteral(L,"dumper not loaded"); lua_error(L); } #endif |
