summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/lundump.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2019-07-18 14:50:38 -0500
committerWilliam Wilgus <me.theuser@yahoo.com>2019-07-18 14:56:00 -0500
commit8bd992c5035bfee6aedbcae7669be5b823537aad (patch)
tree2db34dbf0765362d875242b9908f3d0d95b387bb /apps/plugins/lua/lundump.c
parentd5908f520e8b21091766076584c9f582dbcdae1c (diff)
downloadrockbox-8bd992c5035bfee6aedbcae7669be5b823537aad.tar.gz
rockbox-8bd992c5035bfee6aedbcae7669be5b823537aad.zip
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/lundump.c')
-rw-r--r--apps/plugins/lua/lundump.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/apps/plugins/lua/lundump.c b/apps/plugins/lua/lundump.c
index 6a8422de30..967b45c94b 100644
--- a/apps/plugins/lua/lundump.c
+++ b/apps/plugins/lua/lundump.c
@@ -20,6 +20,8 @@
20#include "lundump.h" 20#include "lundump.h"
21#include "lzio.h" 21#include "lzio.h"
22 22
23#ifndef LUA_DISABLE_BYTECODE
24
23typedef struct { 25typedef struct {
24 lua_State* L; 26 lua_State* L;
25 ZIO* Z; 27 ZIO* Z;
@@ -225,3 +227,14 @@ void luaU_header (char* h)
225 *h++=(char)sizeof(lua_Number); 227 *h++=(char)sizeof(lua_Number);
226 *h++=(char)(((lua_Number)0.5)==0); /* is lua_Number integral? */ 228 *h++=(char)(((lua_Number)0.5)==0); /* is lua_Number integral? */
227} 229}
230
231#else /* LUA_DISABLE_BYTECODE */
232#include "lauxlib.h"
233Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name)
234{
235 (void) Z;
236 (void) buff;
237 luaL_error(L, LUA_QL("%s") " bytecode not supported", name);
238 return NULL;
239}
240#endif