MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luabb_tocstring

Function luabb_tocstring

lua/luautil.c:585–592  ·  view source on GitHub ↗

assumes luabb_iscstring is true */

Source from the content-addressed store, hash-verified

583
584/* assumes luabb_iscstring is true */
585const char *luabb_tocstring(Lua l, int idx)
586{
587 const TValue *o = index2adr(l, idx);
588 lua_dbtypes_t *bb = luabb_todbpointer(o);
589 if (bb->dbtype != DBTYPES_CSTRING) abort();
590 lua_cstring_t *ptr = (lua_cstring_t *)bb;
591 return ptr->val;
592}
593
594/* out should be appropriately sized */
595void luabb_fromhex(uint8_t *out, const uint8_t *in, size_t len)

Callers 1

lua_tolstringFunction · 0.85

Calls 1

index2adrFunction · 0.85

Tested by

no test coverage detected