diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-28 15:46:49 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-05-28 15:46:49 -0300 |
| commit | b293ae0577bebaca7169cb4f041b800641d5e2c4 (patch) | |
| tree | bda609d72277433bda3537ac50ed8fecf9a73898 /lobject.c | |
| parent | d9f40e3f6fb61650240c47d548bee69b24b07859 (diff) | |
| download | lua-b293ae0577bebaca7169cb4f041b800641d5e2c4.tar.gz lua-b293ae0577bebaca7169cb4f041b800641d5e2c4.tar.bz2 lua-b293ae0577bebaca7169cb4f041b800641d5e2c4.zip | |
Details
- new error message for "attempt to assign to const variable"
- note in the manual about compatibility options
- comments
- small changes in 'read_line' and 'pushstr'
Diffstat (limited to 'lobject.c')
| -rw-r--r-- | lobject.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -419,9 +419,9 @@ typedef struct BuffFS { | |||
| 419 | static void pushstr (BuffFS *buff, const char *str, size_t l) { | 419 | static void pushstr (BuffFS *buff, const char *str, size_t l) { |
| 420 | lua_State *L = buff->L; | 420 | lua_State *L = buff->L; |
| 421 | setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); | 421 | setsvalue2s(L, L->top, luaS_newlstr(L, str, l)); |
| 422 | L->top++; | 422 | L->top++; /* may use one extra slot */ |
| 423 | buff->pushed++; | 423 | buff->pushed++; |
| 424 | if (buff->pushed > 1 && L->top + 2 > L->stack_last) { | 424 | if (buff->pushed > 1 && L->top + 1 >= L->stack_last) { |
| 425 | luaV_concat(L, buff->pushed); /* join all partial results into one */ | 425 | luaV_concat(L, buff->pushed); /* join all partial results into one */ |
| 426 | buff->pushed = 1; | 426 | buff->pushed = 1; |
| 427 | } | 427 | } |
