MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / getbuff

Function getbuff

extlibs/lua/src/lobject.c:418–423  ·  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

416** space, empty it. 'sz' must fit in an empty buffer.
417*/
418static char *getbuff (BuffFS *buff, int sz) {
419 lua_assert(buff->blen <= BUFVFS); lua_assert(sz <= BUFVFS);
420 if (sz > BUFVFS - buff->blen) /* not enough space? */
421 clearbuff(buff);
422 return buff->space + buff->blen;
423}
424
425
426#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