MCPcopy Create free account
hub / github.com/ThePhD/sol2 / sol_lua_push

Function sol_lua_push

examples/customization/source/lua_zm_interop.cpp:27–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27int sol_lua_push(
28 sol::types<zm::vec3>, lua_State* L, const zm::vec3& v) {
29 // create table
30 sol::state_view lua(L);
31 sol::table vec3table = sol::table::create_with(
32 L, "x", v.x, "y", v.y, "z", v.z);
33 // use base sol method to
34 // push the table
35 int amount = sol::stack::push(L, vec3table);
36 // return # of things pushed onto stack
37 return amount;
38}

Callers

nothing calls this directly

Calls 1

pushFunction · 0.85

Tested by

no test coverage detected