MCPcopy Create free account
hub / github.com/SOUI2/soui / init_s64

Method init_s64

components/ScriptModule-LUA/lua_tinker/lua_tinker.cpp:56–82  ·  view source on GitHub ↗

---------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

54
55/*---------------------------------------------------------------------------*/
56void lua_tinker::init_s64(lua_State *L)
57{
58 const char* name = "__s64";
59 lua_newtable(L);
60
61 lua_pushstring(L, "__name");
62 lua_pushstring(L, name);
63 lua_rawset(L, -3);
64
65 lua_pushstring(L, "__tostring");
66 lua_pushcclosure(L, tostring_s64, 0);
67 lua_rawset(L, -3);
68
69 lua_pushstring(L, "__eq");
70 lua_pushcclosure(L, eq_s64, 0);
71 lua_rawset(L, -3);
72
73 lua_pushstring(L, "__lt");
74 lua_pushcclosure(L, lt_s64, 0);
75 lua_rawset(L, -3);
76
77 lua_pushstring(L, "__le");
78 lua_pushcclosure(L, le_s64, 0);
79 lua_rawset(L, -3);
80
81 lua_setglobal(L, name); //pop table
82}
83
84/*---------------------------------------------------------------------------*/
85/* __u64 */

Callers

nothing calls this directly

Calls 4

lua_pushstringFunction · 0.85
lua_rawsetFunction · 0.85
lua_pushcclosureFunction · 0.85
lua_setglobalFunction · 0.85

Tested by

no test coverage detected