MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / mp_encode_lua_table

Function mp_encode_lua_table

deps/lua/src/lua_cmsgpack.c:468–473  ·  view source on GitHub ↗

If the length operator returns non-zero, that is, there is at least * an object at key '1', we serialize to message pack list. Otherwise * we use a map. */

Source from the content-addressed store, hash-verified

466 * an object at key '1', we serialize to message pack list. Otherwise
467 * we use a map. */
468void mp_encode_lua_table(lua_State *L, mp_buf *buf, int level) {
469 if (table_is_an_array(L))
470 mp_encode_lua_table_as_array(L,buf,level);
471 else
472 mp_encode_lua_table_as_map(L,buf,level);
473}
474
475void mp_encode_lua_null(lua_State *L, mp_buf *buf) {
476 unsigned char b[1];

Callers 1

mp_encode_lua_typeFunction · 0.85

Calls 3

table_is_an_arrayFunction · 0.85

Tested by

no test coverage detected