mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Compatibility fix for old GCC versions.
This commit is contained in:
parent
6a878b0441
commit
99d588b06a
@ -57,14 +57,22 @@ static LJ_AINLINE int cp_iseol(CPChar c)
|
|||||||
return (c == '\n' || c == '\r');
|
return (c == '\n' || c == '\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
static LJ_AINLINE CPChar cp_get(CPState *cp);
|
|
||||||
|
|
||||||
/* Peek next raw character. */
|
/* Peek next raw character. */
|
||||||
static LJ_AINLINE CPChar cp_rawpeek(CPState *cp)
|
static LJ_AINLINE CPChar cp_rawpeek(CPState *cp)
|
||||||
{
|
{
|
||||||
return (CPChar)(uint8_t)(*cp->p);
|
return (CPChar)(uint8_t)(*cp->p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LJ_NOINLINE CPChar cp_get_bs(CPState *cp);
|
||||||
|
|
||||||
|
/* Get next character. */
|
||||||
|
static LJ_AINLINE CPChar cp_get(CPState *cp)
|
||||||
|
{
|
||||||
|
cp->c = (CPChar)(uint8_t)(*cp->p++);
|
||||||
|
if (LJ_LIKELY(cp->c != '\\')) return cp->c;
|
||||||
|
return cp_get_bs(cp);
|
||||||
|
}
|
||||||
|
|
||||||
/* Transparently skip backslash-escaped line breaks. */
|
/* Transparently skip backslash-escaped line breaks. */
|
||||||
static LJ_NOINLINE CPChar cp_get_bs(CPState *cp)
|
static LJ_NOINLINE CPChar cp_get_bs(CPState *cp)
|
||||||
{
|
{
|
||||||
@ -77,14 +85,6 @@ static LJ_NOINLINE CPChar cp_get_bs(CPState *cp)
|
|||||||
return cp_get(cp);
|
return cp_get(cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get next character. */
|
|
||||||
static LJ_AINLINE CPChar cp_get(CPState *cp)
|
|
||||||
{
|
|
||||||
cp->c = (CPChar)(uint8_t)(*cp->p++);
|
|
||||||
if (LJ_LIKELY(cp->c != '\\')) return cp->c;
|
|
||||||
return cp_get_bs(cp);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Grow save buffer. */
|
/* Grow save buffer. */
|
||||||
static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c)
|
static LJ_NOINLINE void cp_save_grow(CPState *cp, CPChar c)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user