From 5449500a67e39a5c89f233b075589fd57111e177 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 25 Oct 2018 07:10:46 -0400 Subject: Lua Rlimage metatable Put rliimage functions into the rb.image metatable instead of the rb. table Change-Id: Iecdc564c2ea9739656e2025b51bb5d5c62e3dbc1 --- apps/plugins/lua/rocklib_img.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apps/plugins/lua') diff --git a/apps/plugins/lua/rocklib_img.c b/apps/plugins/lua/rocklib_img.c index 909f1b61b9..45012ece20 100644 --- a/apps/plugins/lua/rocklib_img.c +++ b/apps/plugins/lua/rocklib_img.c @@ -1424,9 +1424,10 @@ LUALIB_API int luaopen_rock_img(lua_State *L) lua_pushvalue(L, -1); /* pushes the metatable */ lua_setfield(L, -2, "__index"); /* metatable.__index = metatable */ + luaL_register(L, NULL, rli_lib); /*add rli_lib to the image metatable*/ luaL_register(L, LUA_ROCKLIBNAME, rocklib_img); - luaL_register(L, NULL, rli_lib); return 1; } + -- cgit v1.2.3