| 563 | } |
| 564 | |
| 565 | void mp_decode_to_lua_hash(lua_State *L, mp_cur *c, size_t len) { |
| 566 | assert(len <= UINT_MAX); |
| 567 | lua_newtable(L); |
| 568 | while(len--) { |
| 569 | mp_decode_to_lua_type(L,c); /* key */ |
| 570 | if (c->err) return; |
| 571 | mp_decode_to_lua_type(L,c); /* value */ |
| 572 | if (c->err) return; |
| 573 | lua_settable(L,-3); |
| 574 | } |
| 575 | } |
| 576 | |
| 577 | /* Decode a Message Pack raw object pointed by the string cursor 'c' to |
| 578 | * a Lua type, that is left as the only result on the stack. */ |
no test coverage detected