summaryrefslogtreecommitdiffstats
path: root/apps/plugins/lua/rocklib.h
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-09-17 19:28:10 +0200
committerWilliam Wilgus <me.theuser@yahoo.com>2018-10-08 23:15:16 +0200
commite4b843335bc34810c11ed405d473e6f7c94a153f (patch)
tree5ebfe0f33aaf026d55a7962ae4f710cd5d846628 /apps/plugins/lua/rocklib.h
parentebaddc671e69f12c1933d107b5400002c2364479 (diff)
downloadrockbox-e4b843335bc34810c11ed405d473e6f7c94a153f.tar.gz
rockbox-e4b843335bc34810c11ed405d473e6f7c94a153f.zip
lua rocklib cleanup
removes tslf allocations from do_menu and gui_syncyesno_run in favor of lua_newuserdata removes some luaL_opt functions in favor of equivalent lua_to functions moves some definitions to the rocklib.h file Change-Id: Iaacc3249b8f1af2c220ce59dead0050c66cb3b04
Diffstat (limited to 'apps/plugins/lua/rocklib.h')
-rw-r--r--apps/plugins/lua/rocklib.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/apps/plugins/lua/rocklib.h b/apps/plugins/lua/rocklib.h
index 83d82e56ef..25b5ae1088 100644
--- a/apps/plugins/lua/rocklib.h
+++ b/apps/plugins/lua/rocklib.h
@@ -32,10 +32,18 @@
#define ERR_DATA_OVF "data overflow"
#endif
-#ifndef ERR_NO_ALLOC_DBYTES
-#define ERR_NO_ALLOC_DBYTES "Can't allocate %d bytes!"
-#endif
-
+#define RB_CONSTANT(x) {#x, x}
+#define RB_STRING_CONSTANT(x) RB_CONSTANT(x)
+
+struct lua_int_reg {
+ char const* name;
+ const int value;
+};
+
+struct lua_str_reg {
+ char const* name;
+ char const* value;
+};
LUALIB_API int (luaopen_rock) (lua_State *L);
const char* get_current_path(lua_State *L, int level);