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

Function mp_encode_lua_bool

deps/lua/src/lua_cmsgpack.c:349–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349void mp_encode_lua_bool(lua_State *L, mp_buf *buf) {
350 unsigned char b = lua_toboolean(L,-1) ? 0xc3 : 0xc2;
351 mp_buf_append(L,buf,&b,1);
352}
353
354/* Lua 5.3 has a built in 64-bit integer type */
355void mp_encode_lua_integer(lua_State *L, mp_buf *buf) {

Callers 1

mp_encode_lua_typeFunction · 0.85

Calls 2

lua_tobooleanFunction · 0.85
mp_buf_appendFunction · 0.85

Tested by

no test coverage detected