Lua Rlimage metatable
Put rliimage functions into the rb.image metatable instead of the rb. table Change-Id: Iecdc564c2ea9739656e2025b51bb5d5c62e3dbc1
This commit is contained in:
parent
55533c4d36
commit
5449500a67
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue