diff options
author | Mike Pall <mike> | 2013-02-28 01:11:49 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2013-02-28 01:11:49 +0100 |
commit | 87c51e7f57ec9277a02e7e21c8a28b4cb9d08914 (patch) | |
tree | da3a7ac7babe8fe86d68df7472faa753dd70f682 /src/lj_bcread.c | |
parent | 116cdd7e9a578efffa5a9ca38167d059d12296d7 (diff) | |
download | luajit-87c51e7f57ec9277a02e7e21c8a28b4cb9d08914.tar.gz luajit-87c51e7f57ec9277a02e7e21c8a28b4cb9d08914.tar.bz2 luajit-87c51e7f57ec9277a02e7e21c8a28b4cb9d08914.zip |
Cleanup lexer source code.
Diffstat (limited to 'src/lj_bcread.c')
-rw-r--r-- | src/lj_bcread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_bcread.c b/src/lj_bcread.c index eda121e0..5be34757 100644 --- a/src/lj_bcread.c +++ b/src/lj_bcread.c | |||
@@ -47,7 +47,7 @@ static LJ_NOINLINE void bcread_error(LexState *ls, ErrMsg em) | |||
47 | static LJ_NOINLINE void bcread_fill(LexState *ls, MSize len, int need) | 47 | static LJ_NOINLINE void bcread_fill(LexState *ls, MSize len, int need) |
48 | { | 48 | { |
49 | lua_assert(len != 0); | 49 | lua_assert(len != 0); |
50 | if (len > LJ_MAX_MEM || ls->current < 0) | 50 | if (len > LJ_MAX_MEM || ls->c < 0) |
51 | bcread_error(ls, LJ_ERR_BCBAD); | 51 | bcread_error(ls, LJ_ERR_BCBAD); |
52 | do { | 52 | do { |
53 | const char *buf; | 53 | const char *buf; |
@@ -66,7 +66,7 @@ static LJ_NOINLINE void bcread_fill(LexState *ls, MSize len, int need) | |||
66 | buf = ls->rfunc(ls->L, ls->rdata, &size); /* Get more data from reader. */ | 66 | buf = ls->rfunc(ls->L, ls->rdata, &size); /* Get more data from reader. */ |
67 | if (buf == NULL || size == 0) { /* EOF? */ | 67 | if (buf == NULL || size == 0) { /* EOF? */ |
68 | if (need) bcread_error(ls, LJ_ERR_BCBAD); | 68 | if (need) bcread_error(ls, LJ_ERR_BCBAD); |
69 | ls->current = -1; /* Only bad if we get called again. */ | 69 | ls->c = -1; /* Only bad if we get called again. */ |
70 | break; | 70 | break; |
71 | } | 71 | } |
72 | if (sbuflen(&ls->sb)) { /* Append to buffer. */ | 72 | if (sbuflen(&ls->sb)) { /* Append to buffer. */ |
@@ -430,7 +430,7 @@ static int bcread_header(LexState *ls) | |||
430 | GCproto *lj_bcread(LexState *ls) | 430 | GCproto *lj_bcread(LexState *ls) |
431 | { | 431 | { |
432 | lua_State *L = ls->L; | 432 | lua_State *L = ls->L; |
433 | lua_assert(ls->current == BCDUMP_HEAD1); | 433 | lua_assert(ls->c == BCDUMP_HEAD1); |
434 | bcread_savetop(L, ls, L->top); | 434 | bcread_savetop(L, ls, L->top); |
435 | lj_buf_reset(&ls->sb); | 435 | lj_buf_reset(&ls->sb); |
436 | /* Check for a valid bytecode dump header. */ | 436 | /* Check for a valid bytecode dump header. */ |