diff options
| author | Warner Losh <imp@FreeBSD.org> | 2024-02-16 03:52:48 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2024-04-16 19:54:23 +0000 |
| commit | 5bbe8ec08417dbfc0ef7761e28764fe01047311a (patch) | |
| tree | a4b8c2923fe2672323aba18501392cefca2fdda1 /stand/liblua | |
| parent | c54653978ebd2ad8f6cea4b8220bb620b1f3db40 (diff) | |
Diffstat (limited to 'stand/liblua')
| -rw-r--r-- | stand/liblua/lutils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c index 182bd699dbc3..0dbd8a6f720b 100644 --- a/stand/liblua/lutils.c +++ b/stand/liblua/lutils.c @@ -578,6 +578,10 @@ static const struct luaL_Reg loaderlib[] = { REG_SIMPLE(setenv), REG_SIMPLE(time), REG_SIMPLE(unsetenv), + { NULL, NULL }, +}; + +static const struct luaL_Reg gfxlib[] = { REG_SIMPLE(fb_bezier), REG_SIMPLE(fb_drawrect), REG_SIMPLE(fb_line), @@ -627,10 +631,17 @@ lua_add_features(lua_State *L) lua_setfield(L, -2, "features"); } +static void +luaopen_gfx(lua_State *L) +{ + luaL_newlib(L, gfxlib); +} + int luaopen_loader(lua_State *L) { luaL_newlib(L, loaderlib); + luaopen_gfx(L); /* Add loader.machine and loader.machine_arch properties */ lua_pushstring(L, MACHINE); lua_setfield(L, -2, "machine"); |
