MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / CreateAndPush

Method CreateAndPush

LuaSTGPlus/LuaWrapper.cpp:209–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209fcyColor* ColorWrapper::CreateAndPush(lua_State* L)
210{
211 fcyColor* p = static_cast<fcyColor*>(lua_newuserdata(L, sizeof(fcyColor)));
212 new(p) fcyColor(); // 构造
213 luaL_getmetatable(L, TYPENAME_COLOR);
214 lua_setmetatable(L, -2);
215 return p;
216}
217#pragma endregion
218
219////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected