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

Function mp_encode_lua_string

deps/lua/src/lua_cmsgpack.c:341–347  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

339/* --------------------------- Lua types encoding --------------------------- */
340
341void mp_encode_lua_string(lua_State *L, mp_buf *buf) {
342 size_t len;
343 const char *s;
344
345 s = lua_tolstring(L,-1,&len);
346 mp_encode_bytes(L,buf,(const unsigned char*)s,len);
347}
348
349void mp_encode_lua_bool(lua_State *L, mp_buf *buf) {
350 unsigned char b = lua_toboolean(L,-1) ? 0xc3 : 0xc2;

Callers 1

mp_encode_lua_typeFunction · 0.85

Calls 2

lua_tolstringFunction · 0.85
mp_encode_bytesFunction · 0.85

Tested by

no test coverage detected