MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / getbuff

Function getbuff

lib/lua/src/lobject.c:438–443  ·  view source on GitHub ↗

** Get a space of size 'sz' in the buffer. If buffer has not enough ** space, empty it. 'sz' must fit in an empty buffer. */

Source from the content-addressed store, hash-verified

436** space, empty it. 'sz' must fit in an empty buffer.
437*/
438static char *getbuff (BuffFS *buff, int sz) {
439 lua_assert(buff->blen <= BUFVFS); lua_assert(sz <= BUFVFS);
440 if (sz > BUFVFS - buff->blen) /* not enough space? */
441 clearbuff(buff);
442 return buff->space + buff->blen;
443}
444
445
446#define addsize(b,sz) ((b)->blen += (sz))

Callers 3

addstr2buffFunction · 0.85
addnum2buffFunction · 0.85
luaO_pushvfstringFunction · 0.85

Calls 1

clearbuffFunction · 0.85

Tested by

no test coverage detected