| 55 | |
| 56 | |
| 57 | static void save (LexState *ls, int c) { |
| 58 | Mbuffer *b = ls->buff; |
| 59 | if (luaZ_bufflen(b) + 1 > luaZ_sizebuffer(b)) { |
| 60 | size_t newsize; |
| 61 | if (luaZ_sizebuffer(b) >= MAX_SIZE/2) |
| 62 | lexerror(ls, "lexical element too long", 0); |
| 63 | newsize = luaZ_sizebuffer(b) * 2; |
| 64 | luaZ_resizebuffer(ls->L, b, newsize); |
| 65 | } |
| 66 | b->buffer[luaZ_bufflen(b)++] = cast_char(c); |
| 67 | } |
| 68 | |
| 69 | |
| 70 | void luaX_init (lua_State *L) { |
no test coverage detected