| 50 | |
| 51 | |
| 52 | static void save (LexState *ls, int c) { |
| 53 | Mbuffer *b = ls->buff; |
| 54 | if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) { |
| 55 | size_t newsize; |
| 56 | if (luaZ_sizebuffer(b) >= MAX_SIZET/2) |
| 57 | lexerror(ls, "lexical element too long", 0); |
| 58 | newsize = luaZ_sizebuffer(b) * 2; |
| 59 | luaZ_resizebuffer(ls->L, b, newsize); |
| 60 | } |
| 61 | b->buffer[luaZ_bufflen(b)++] = cast(char, c); |
| 62 | } |
| 63 | |
| 64 | |
| 65 | void luaX_init (lua_State *L) { |
no test coverage detected