Add lua table lib to colorlcd (#7599)
* Add lua table lib to colorlcd * Allow require on colorlcd
This commit is contained in:
+1
@@ -29,6 +29,7 @@ extern const luaL_Reg mathlib[];
|
|||||||
extern const luaL_Reg bitlib[];
|
extern const luaL_Reg bitlib[];
|
||||||
extern const luaL_Reg iolib[];
|
extern const luaL_Reg iolib[];
|
||||||
extern const luaL_Reg strlib[];
|
extern const luaL_Reg strlib[];
|
||||||
|
extern const luaL_Reg tab_funcs[];
|
||||||
|
|
||||||
extern const luaL_Reg opentxLib[];
|
extern const luaL_Reg opentxLib[];
|
||||||
extern const luaL_Reg lcdLib[];
|
extern const luaL_Reg lcdLib[];
|
||||||
|
|||||||
Vendored
+6
-1
@@ -28,7 +28,9 @@
|
|||||||
*/
|
*/
|
||||||
static const luaL_Reg loadedlibs[] = {
|
static const luaL_Reg loadedlibs[] = {
|
||||||
// {"_G", luaopen_base},
|
// {"_G", luaopen_base},
|
||||||
// {LUA_LOADLIBNAME, luaopen_package},
|
#if defined(PCBHORUS)
|
||||||
|
{LUA_LOADLIBNAME, luaopen_package},
|
||||||
|
#endif
|
||||||
// {LUA_COLIBNAME, luaopen_coroutine},
|
// {LUA_COLIBNAME, luaopen_coroutine},
|
||||||
// {LUA_TABLIBNAME, luaopen_table},
|
// {LUA_TABLIBNAME, luaopen_table},
|
||||||
{LUA_IOLIBNAME, luaopen_io},
|
{LUA_IOLIBNAME, luaopen_io},
|
||||||
@@ -51,6 +53,9 @@ const luaR_table lua_rotable[] =
|
|||||||
{LUA_STRLIBNAME, strlib, NULL},
|
{LUA_STRLIBNAME, strlib, NULL},
|
||||||
{LUA_MATHLIBNAME, mathlib, mathlib_vals},
|
{LUA_MATHLIBNAME, mathlib, mathlib_vals},
|
||||||
{LUA_BITLIBNAME, bitlib, NULL},
|
{LUA_BITLIBNAME, bitlib, NULL},
|
||||||
|
#if defined(PCBHORUS)
|
||||||
|
{LUA_TABLIBNAME, tab_funcs, NULL},
|
||||||
|
#endif
|
||||||
{NULL, NULL, NULL}
|
{NULL, NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -256,7 +256,7 @@ static int sort (lua_State *L) {
|
|||||||
/* }====================================================== */
|
/* }====================================================== */
|
||||||
|
|
||||||
|
|
||||||
static const luaL_Reg tab_funcs[] = {
|
const luaL_Reg tab_funcs[] = {
|
||||||
{"concat", tconcat},
|
{"concat", tconcat},
|
||||||
#if defined(LUA_COMPAT_MAXN)
|
#if defined(LUA_COMPAT_MAXN)
|
||||||
{"maxn", maxn},
|
{"maxn", maxn},
|
||||||
|
|||||||
Reference in New Issue
Block a user