diff options
author | Mike Pall <mike> | 2013-08-03 14:15:17 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-08-03 14:15:17 +0200 |
commit | 99d588b06a0972f3ea84cad528004891ea8bc0e3 (patch) | |
tree | 5c32940b3b92db2650ee224bbf6cad8b6fc5c63a | |
parent | 6a878b04413b0b02412399aaa9dd8f3767a193f7 (diff) | |
download | luajit-99d588b06a0972f3ea84cad528004891ea8bc0e3.tar.gz luajit-99d588b06a0972f3ea84cad528004891ea8bc0e3.tar.bz2 luajit-99d588b06a0972f3ea84cad528004891ea8bc0e3.zip |
Compatibility fix for old GCC versions.
-rw-r--r-- | src/lj_cparse.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/lj_cparse.c b/src/lj_cparse.c index 107c0381..8d111cc9 100644 --- a/src/lj_cparse.c +++ b/src/lj_cparse.c | |||
@@ -57,14 +57,22 @@ static LJ_AINLINE int cp_iseol(CPChar c) | |||
57 | return (c == '\n' || c == '\r'); | 57 | return (c == '\n' || c == '\r'); |
58 | } | 58 | } |
59 | 59 | ||
60 | static LJ_AINLINE CPChar cp_get(CPState *cp); | ||
61 | |||
62 | /* Peek next raw character. */ | 60 | /* Peek next raw character. */ |
63 | static LJ_AINLINE CPChar cp_rawpeek(CPState *cp) | 61 | static LJ_AINLINE CPChar cp_rawpeek(CPState *cp) |
64 | { | 62 | { |
65 | return (CPChar)(uint8_t)(*cp->p); | 63 | return (CPChar)(uint8_t)(*cp->p); |
66 | } | 64 | } |
67 | 65 | ||
66 | static LJ_NOINLINE CPChar cp_get_bs(CPState *cp); | ||
67 | |||
68 | /* Get next character. */ | ||
69 | static LJ_AINLINE CPChar cp_get(CPState *cp) | ||
70 | { | ||
71 | cp->c = (CPChar)(uint8_t)(*cp->p++); | ||
72 | if (LJ_LIKELY(cp->c != '\\')) return cp->c; | ||
73 | return cp_get_bs(cp); | ||
74 | } | ||
75 | |||
68 | /* Transparently skip backslash-escaped line breaks. */ | 76 | /* Transparently skip backslash-escaped line breaks. */ |
69 | static LJ_NOINLINE CPChar cp_get_bs(CPState *cp) | 77 | static LJ_NOINLINE CPChar cp_get_bs(CPState *cp) |
70 | { | 78 | { |
@@ -77,14 +85,6 @@ static LJ_NOINLINE CPChar cp_get_bs(CPState *cp) | |||
77 | return cp_get(cp); | 85 | return cp_get(cp); |
78 | } | 86 | } |
79 | 87 | ||
80 | /* Get next character. */ | ||
81 | static LJ_AINLINE CPChar cp_get(CPState *cp) | ||
82 | { | ||
83 | cp->c = (CPChar)(uint8_t)(*cp->p++); | ||
84 | if (LJ_LIKELY(cp->c != '\\')) return cp->c; | ||
85 | return cp_get_bs(cp); | ||
86 | } | ||
87 | |||
88 | /* Grow save buffer. */ | 88 | /* Grow save buffer. */ |
89 | static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c) | 89 | static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c) |
90 | { | 90 | { |