diff options
| author | William Wilgus <me.theuser@yahoo.com> | 2019-07-18 14:50:38 -0500 |
|---|---|---|
| committer | William Wilgus <me.theuser@yahoo.com> | 2019-07-18 14:56:00 -0500 |
| commit | 8bd992c5035bfee6aedbcae7669be5b823537aad (patch) | |
| tree | 2db34dbf0765362d875242b9908f3d0d95b387bb /apps/plugins/lua/ldump.c | |
| parent | d5908f520e8b21091766076584c9f582dbcdae1c (diff) | |
| download | rockbox-8bd992c5035bfee6aedbcae7669be5b823537aad.zip rockbox-8bd992c5035bfee6aedbcae7669be5b823537aad.tar.gz rockbox-8bd992c5035bfee6aedbcae7669be5b823537aad.tar.bz2 rockbox-8bd992c5035bfee6aedbcae7669be5b823537aad.tar.xz | |
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
Diffstat (limited to 'apps/plugins/lua/ldump.c')
| -rw-r--r-- | apps/plugins/lua/ldump.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/plugins/lua/ldump.c b/apps/plugins/lua/ldump.c index c9d3d48..9afba60 100644 --- a/apps/plugins/lua/ldump.c +++ b/apps/plugins/lua/ldump.c @@ -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 |