| 245 | #define marklen (sizeof(EOFMARK)/sizeof(char) - 1) |
| 246 | |
| 247 | static int incomplete (lua_State *L, int status) { |
| 248 | if (status == LUA_ERRSYNTAX) { |
| 249 | size_t lmsg; |
| 250 | const char *msg = lua_tolstring(L, -1, &lmsg); |
| 251 | if (lmsg >= marklen && strcmp(msg + lmsg - marklen, EOFMARK) == 0) { |
| 252 | lua_pop(L, 1); |
| 253 | return 1; |
| 254 | } |
| 255 | } |
| 256 | return 0; /* else... */ |
| 257 | } |
| 258 | |
| 259 | |
| 260 | static int pushline (lua_State *L, int firstline) { |
no test coverage detected