| 127 | } |
| 128 | |
| 129 | UInt64 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 | |
| 144 | UInt64 ScriptWriter::reference() { |
| 145 | // record last reference |
nothing calls this directly
no outgoing calls
no test coverage detected