Lua Rlimage metatable

Put rliimage functions into the rb.image metatable instead of the rb. table

Change-Id: Iecdc564c2ea9739656e2025b51bb5d5c62e3dbc1
This commit is contained in:
William Wilgus 2018-10-25 07:10:46 -04:00
parent 55533c4d36
commit 5449500a67

View file

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