** Push given string to the stack, as part of the buffer. If the stack ** is almost full, join all partial strings in the stack into one. */
| 391 | ** is almost full, join all partial strings in the stack into one. |
| 392 | */ |
| 393 | static void pushstr (BuffFS *buff, const char *str, size_t l) { |
| 394 | lua_State *L = buff->L; |
| 395 | setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); |
| 396 | L->top++; /* may use one extra slot */ |
| 397 | buff->pushed++; |
| 398 | if (buff->pushed > 1 && L->top + 1 >= L->stack_last) { |
| 399 | luaV_concat(L, buff->pushed); /* join all partial results into one */ |
| 400 | buff->pushed = 1; |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | |
| 405 | /* |
no test coverage detected