| 239 | } |
| 240 | |
| 241 | static void fetch_container_details(lua_State *state, int meta, const type_identity **pitem, int *pcount) |
| 242 | { |
| 243 | if (!meta) return; |
| 244 | |
| 245 | lua_getfield(state, meta, "_field_identity"); |
| 246 | *pitem = (type_identity*)lua_touserdata(state, -1); |
| 247 | lua_pop(state, 1); |
| 248 | |
| 249 | if (pcount) |
| 250 | { |
| 251 | lua_getfield(state, meta, "_count"); |
| 252 | if (lua_isnumber(state, -1)) |
| 253 | *pcount = lua_tointeger(state, -1); |
| 254 | lua_pop(state, 1); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | /** |
| 259 | * Check if type1 and type2 are compatible, possibly using additional metatable data. |
no test coverage detected