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
|
@ -15,6 +15,8 @@
|
|||
#include "lstate.h"
|
||||
#include "lundump.h"
|
||||
|
||||
#ifndef LUA_DISABLE_BYTECODE
|
||||
|
||||
typedef struct {
|
||||
lua_State* L;
|
||||
lua_Writer writer;
|
||||
|
@ -162,3 +164,14 @@ int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip
|
|||
DumpFunction(f,NULL,&D);
|
||||
return D.status;
|
||||
}
|
||||
#else /* LUA_DISABLE_BYTECODE */
|
||||
#include "lauxlib.h"
|
||||
int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip)
|
||||
{
|
||||
(void) f;
|
||||
(void) w;
|
||||
(void) data;
|
||||
(void) strip;
|
||||
return luaL_error(L, " bytecode not supported");
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue