MCPcopy Create free account
hub / github.com/MonaSolutions/MonaServer / beginMap

Method beginMap

MonaServer/sources/ScriptWriter.cpp:129–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129UInt64 ScriptWriter::beginMap(Exception& ex, UInt32 size, bool weakKeys) {
130 start();
131 lua_newtable(_pState);
132 lua_pushnumber(_pState,size);
133 lua_setfield(_pState,-2,"__size");
134 if(weakKeys) {
135 lua_newtable(_pState);
136 lua_pushliteral(_pState,"k");
137 lua_setfield(_pState,-2,"__mode");
138 lua_setmetatable(_pState,-2);
139 }
140 _layers.push_back(-3);
141 return reference();
142}
143
144UInt64 ScriptWriter::reference() {
145 // record last reference

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected