forked from len0rd/rockbox
lua disable bytecode dump & undump functions
Adds a flag to remove the ability to dump and load lua bytecode saves 6+kb Change-Id: I080323df7f03f752e0a10928e22a7ce3190a9633
This commit is contained in:
parent
d5908f520e
commit
8bd992c503
4 changed files with 33 additions and 5 deletions
|
@ -20,6 +20,8 @@
|
|||
#include "lundump.h"
|
||||
#include "lzio.h"
|
||||
|
||||
#ifndef LUA_DISABLE_BYTECODE
|
||||
|
||||
typedef struct {
|
||||
lua_State* L;
|
||||
ZIO* Z;
|
||||
|
@ -225,3 +227,14 @@ void luaU_header (char* h)
|
|||
*h++=(char)sizeof(lua_Number);
|
||||
*h++=(char)(((lua_Number)0.5)==0); /* is lua_Number integral? */
|
||||
}
|
||||
|
||||
#else /* LUA_DISABLE_BYTECODE */
|
||||
#include "lauxlib.h"
|
||||
Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name)
|
||||
{
|
||||
(void) Z;
|
||||
(void) buff;
|
||||
luaL_error(L, LUA_QL("%s") " bytecode not supported", name);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue