forked from len0rd/rockbox
Revert "Update lua plugin to 5.2.3"
FILE typedef to *void needs more work to not break sim and application builds. I checked only a few random native builds unfortunately. Sorry for inconvenience.
This commit is contained in:
parent
36378988ad
commit
bfd0179042
64 changed files with 5733 additions and 9088 deletions
|
@ -26,8 +26,7 @@
|
|||
#include "rocklib.h"
|
||||
#include "luadir.h"
|
||||
|
||||
#undef LUA_BITLIBNAME
|
||||
#define LUA_BITLIBNAME "bit"
|
||||
|
||||
|
||||
static const luaL_Reg lualibs[] = {
|
||||
{"", luaopen_base},
|
||||
|
@ -35,7 +34,7 @@ static const luaL_Reg lualibs[] = {
|
|||
{LUA_STRLIBNAME, luaopen_string},
|
||||
{LUA_OSLIBNAME, luaopen_os},
|
||||
{LUA_ROCKLIBNAME, luaopen_rock},
|
||||
{LUA_BITLIBNAME, luaopen_bit32},
|
||||
{LUA_BITLIBNAME, luaopen_bit},
|
||||
{LUA_IOLIBNAME, luaopen_io},
|
||||
{LUA_LOADLIBNAME, luaopen_package},
|
||||
{LUA_MATHLIBNAME, luaopen_math},
|
||||
|
@ -44,10 +43,11 @@ static const luaL_Reg lualibs[] = {
|
|||
};
|
||||
|
||||
static void rocklua_openlibs(lua_State *L) {
|
||||
const luaL_Reg *lib;
|
||||
for (lib = lualibs; lib->func; lib++) {
|
||||
luaL_requiref(L, lib->name, lib->func, 1);
|
||||
lua_pop(L, 1); /* remove lib */
|
||||
const luaL_Reg *lib = lualibs;
|
||||
for (; lib->func; lib++) {
|
||||
lua_pushcfunction(L, lib->func);
|
||||
lua_pushstring(L, lib->name);
|
||||
lua_call(L, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue