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

Function luabb_pushcstringlen

lua/ltypes.c:2118–2125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2116}
2117
2118void luabb_pushcstringlen(lua_State *lua, const char* cstrval, int len)
2119{
2120 l_cstring_new(lua);
2121 lua_cstring_t *s = (lua_cstring_t *) lua_topointer(lua, -1);
2122 s->val = malloc(len + 1);
2123 memcpy(s->val, cstrval, len);
2124 s->val[len] = '\0';
2125}
2126
2127// dl -> str'dup'-less
2128void luabb_pushcstring_dl(lua_State *lua, const char* cstrval)

Callers 2

push_paramFunction · 0.85
push_trigger_fieldFunction · 0.85

Calls 3

l_cstring_newFunction · 0.85
lua_topointerFunction · 0.85
mallocFunction · 0.85

Tested by

no test coverage detected