lua-users home
lua-l archive

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


> Somewhat related question: could an option be added to luaconf.h to
> select whether loading precompiled scripts is supported (and if not,
> the undump code is not compiled at all)?

You could add this to the end of luaconf.h:

#ifdef ldo_c

#include "lundump.h"
LUAI_FUNC Proto *luaU_undump (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) {
  UNUSED(z);
  UNUSED(buff);
  UNUSED(name);
  lua_pushliteral(L,"cannot load binary chunks");
  lua_error(L);
  return NULL;
}

#endif