Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2013-08-03 14:24:14 +02:00
commit f5fba48386

View File

@ -58,14 +58,22 @@ static LJ_AINLINE int cp_iseol(CPChar c)
return (c == '\n' || c == '\r');
}
static LJ_AINLINE CPChar cp_get(CPState *cp);
/* Peek next raw character. */
static LJ_AINLINE CPChar cp_rawpeek(CPState *cp)
{
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. */
static LJ_NOINLINE CPChar cp_get_bs(CPState *cp)
{
@ -78,14 +86,6 @@ static LJ_NOINLINE CPChar cp_get_bs(CPState *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);
}
/* Save character in buffer. */
static LJ_AINLINE void cp_save(CPState *cp, CPChar c)
{