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

Function emptybuffer

deps/lua/src/lauxlib.c:398–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

396
397
398static int emptybuffer (luaL_Buffer *B) {
399 size_t l = bufflen(B);
400 if (l == 0) return 0; /* put nothing on stack */
401 else {
402 lua_pushlstring(B->L, B->buffer, l);
403 B->p = B->buffer;
404 B->lvl++;
405 return 1;
406 }
407}
408
409
410static void adjuststack (luaL_Buffer *B) {

Callers 3

luaL_prepbufferFunction · 0.85
luaL_pushresultFunction · 0.85
luaL_addvalueFunction · 0.85

Calls 1

lua_pushlstringFunction · 0.85

Tested by

no test coverage detected