summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Pall <mike>2013-08-03 14:15:17 +0200
committerMike Pall <mike>2013-08-03 14:15:17 +0200
commit99d588b06a0972f3ea84cad528004891ea8bc0e3 (patch)
tree5c32940b3b92db2650ee224bbf6cad8b6fc5c63a
parent6a878b04413b0b02412399aaa9dd8f3767a193f7 (diff)
downloadluajit-99d588b06a0972f3ea84cad528004891ea8bc0e3.tar.gz
luajit-99d588b06a0972f3ea84cad528004891ea8bc0e3.tar.bz2
luajit-99d588b06a0972f3ea84cad528004891ea8bc0e3.zip
Compatibility fix for old GCC versions.
-rw-r--r--src/lj_cparse.c20
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
60static LJ_AINLINE CPChar cp_get(CPState *cp);
61
62/* Peek next raw character. */ 60/* Peek next raw character. */
63static LJ_AINLINE CPChar cp_rawpeek(CPState *cp) 61static 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
66static LJ_NOINLINE CPChar cp_get_bs(CPState *cp);
67
68/* Get next character. */
69static 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. */
69static LJ_NOINLINE CPChar cp_get_bs(CPState *cp) 77static 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. */
81static 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. */
89static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c) 89static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c)
90{ 90{