MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / tolua_function

Function tolua_function

Source/Lua/ToLua/tolua_map.cpp:335–339  ·  view source on GitHub ↗

Map function * It assigns a function into the current module(or class) */

Source from the content-addressed store, hash-verified

333 * It assigns a function into the current module(or class)
334 */
335void tolua_function(lua_State* L, const char* name, lua_CFunction func) {
336 lua_pushstring(L, name);
337 lua_pushcfunction(L, func);
338 lua_rawset(L, -3);
339}
340
341void tolua_call(lua_State* L, tolua_mt index, lua_CFunction func) {
342 lua_pushcfunction(L, func);

Callers 2

LuaEngineMethod · 0.85
tolua_openFunction · 0.85

Calls 2

lua_pushstringFunction · 0.50
lua_rawsetFunction · 0.50

Tested by

no test coverage detected