src/lobject.c
static void addstr2buff (BuffFS *buff, const char *str, size_t slen) {
  if (slen <= BUFVFS) {  /* does string fit into buffer? */
    char *bf = getbuff(buff, cast_int(slen));
    memcpy(bf, str, slen);  /* add string to buffer */
    addsize(buff, cast_int(slen));
  }
  else {  /* string larger than buffer */
    clearbuff(buff);  /* string comes after buffer's content */
    pushstr(buff, str, slen);  /* push string */
  }
}
/*
** Add 'str' to the buffer. If string is larger than the buffer space,
** push the string directly to the stack.
*/
Add 'str' to the buffer. If string is larger than the buffer space,
push the string directly to the stack.
Add ' str ' to the buffer . If string is larger than the buffer space push the string directly to the stack .
static void addstr2buff (BuffFS *buff, const char *str, size_t slen) {
  if (slen <= BUFVFS) {  
    char *bf = getbuff(buff, cast_int(slen));
    memcpy(bf, str, slen);  
    addsize(buff, cast_int(slen));
  }
  else {  
    clearbuff(buff);  
    pushstr(buff, str, slen);  
  }
}
static void addstr2buff ( BuffFS * buff , const char * str , size_t slen ) { if ( slen <= BUFVFS ) { char * bf = getbuff ( buff , cast_int ( slen ) ) ; memcpy ( bf , str , slen ) ; addsize ( buff , cast_int ( slen ) ) ; } else { clearbuff ( buff ) ; pushstr ( buff , str , slen ) ; } }
Add 'str' to the buffer.
Add ' str ' to the buffer .
/* does string fit into buffer? */ /* add string to buffer */ /* string larger than buffer */ /* string comes after buffer's content */ /* push string */