MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / luaL_callmeta

Function luaL_callmeta

deps/lua/src/lauxlib.c:219–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217
218
219LUALIB_API int luaL_callmeta (lua_State *L, int obj, const char *event) {
220 obj = abs_index(L, obj);
221 if (!luaL_getmetafield(L, obj, event)) /* no metafield? */
222 return 0;
223 lua_pushvalue(L, obj);
224 lua_call(L, 1, 1);
225 return 1;
226}
227
228
229LUALIB_API void (luaL_register) (lua_State *L, const char *libname,

Callers 1

luaB_tostringFunction · 0.85

Calls 3

luaL_getmetafieldFunction · 0.85
lua_pushvalueFunction · 0.85
lua_callFunction · 0.85

Tested by

no test coverage detected