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

Function luabb_newblob

lua/ltypes.c:2236–2246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2234}
2235
2236char *luabb_newblob(Lua lua, int len, void **blob)
2237{
2238 lua_blob_t *b;
2239 l_blob_new(lua);
2240 *blob = b = (void *) lua_topointer(lua, -1);
2241 lua_pop(lua, 1);
2242 b->val.data = malloc(len);
2243 memset(b->val.data, 0xff, len);
2244 b->val.length = len;
2245 return (char *)b->val.data;
2246}
2247
2248static int l_typed_assignment(lua_State *lua)
2249{

Callers 1

codeblobFunction · 0.85

Calls 3

l_blob_newFunction · 0.85
lua_topointerFunction · 0.85
mallocFunction · 0.85

Tested by

no test coverage detected