1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
William Wilgus 2018-09-17 19:28:10 +02:00
parent ebaddc671e
commit e4b843335b
2 changed files with 83 additions and 83 deletions

View file

@ -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);