mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Avoid compiler warnings about redefined C++ keywords.
This commit is contained in:
parent
6e4d0fdc8e
commit
f20ff8a30d
@ -257,7 +257,7 @@ LJLIB_ASM(tostring) LJLIB_REC(.)
|
||||
if (tvisfunc(o) && isffunc(funcV(o)))
|
||||
lua_pushfstring(L, "function: fast#%d", funcV(o)->c.ffid);
|
||||
else
|
||||
lua_pushfstring(L, "%s: %p", typename(o), lua_topointer(L, 1));
|
||||
lua_pushfstring(L, "%s: %p", lj_typename(o), lua_topointer(L, 1));
|
||||
/* Note: lua_pushfstring calls the GC which may invalidate o. */
|
||||
s = strV(L->top-1);
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ LJLIB_CF(table_concat)
|
||||
lua_rawgeti(L, 1, i);
|
||||
o = L->top-1;
|
||||
if (!(tvisstr(o) || tvisnumber(o)))
|
||||
lj_err_callerv(L, LJ_ERR_TABCAT, typename(o), i);
|
||||
lj_err_callerv(L, LJ_ERR_TABCAT, lj_typename(o), i);
|
||||
luaL_addvalue(&b);
|
||||
if (i++ == e) break;
|
||||
if (seplen)
|
||||
|
@ -213,7 +213,7 @@ static int lj_carith_meta(lua_State *L, CTState *cts, CDArith *ca, MMS mm)
|
||||
if (ca->ct[i])
|
||||
repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL));
|
||||
else
|
||||
repr[i] = typename(&L->base[i]);
|
||||
repr[i] = lj_typename(&L->base[i]);
|
||||
}
|
||||
lj_err_callerv(L, mm == MM_len ? LJ_ERR_FFI_BADLEN :
|
||||
mm == MM_concat ? LJ_ERR_FFI_BADCONCAT :
|
||||
|
@ -38,7 +38,7 @@ LJ_NORET static void cconv_err_convtv(CTState *cts, CType *d, TValue *o,
|
||||
CTInfo flags)
|
||||
{
|
||||
const char *dst = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, d), NULL));
|
||||
const char *src = typename(o);
|
||||
const char *src = lj_typename(o);
|
||||
if (CCF_GETARG(flags))
|
||||
lj_err_argv(cts->L, CCF_GETARG(flags), LJ_ERR_FFI_BADCONV, src, dst);
|
||||
else
|
||||
|
10
src/lj_err.c
10
src/lj_err.c
@ -598,7 +598,7 @@ LJ_NOINLINE void lj_err_lex(lua_State *L, GCstr *src, const char *tok,
|
||||
/* Typecheck error for operands. */
|
||||
LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm)
|
||||
{
|
||||
const char *tname = typename(o);
|
||||
const char *tname = lj_typename(o);
|
||||
const char *opname = err2msg(opm);
|
||||
if (curr_funcisL(L)) {
|
||||
GCproto *pt = curr_proto(L);
|
||||
@ -614,8 +614,8 @@ LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm)
|
||||
/* Typecheck error for ordered comparisons. */
|
||||
LJ_NOINLINE void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2)
|
||||
{
|
||||
const char *t1 = typename(o1);
|
||||
const char *t2 = typename(o2);
|
||||
const char *t1 = lj_typename(o1);
|
||||
const char *t2 = lj_typename(o2);
|
||||
err_msgv(L, t1 == t2 ? LJ_ERR_BADCMPV : LJ_ERR_BADCMPT, t1, t2);
|
||||
/* This assumes the two "boolean" entries are commoned by the C compiler. */
|
||||
}
|
||||
@ -629,7 +629,7 @@ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o)
|
||||
*/
|
||||
const BCIns *pc = cframe_Lpc(L);
|
||||
if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) {
|
||||
const char *tname = typename(o);
|
||||
const char *tname = lj_typename(o);
|
||||
setframe_pc(o, pc);
|
||||
setframe_gc(o, obj2gco(L));
|
||||
L->top = L->base = o+1;
|
||||
@ -722,7 +722,7 @@ LJ_NOINLINE void lj_err_arg(lua_State *L, int narg, ErrMsg em)
|
||||
LJ_NOINLINE void lj_err_argtype(lua_State *L, int narg, const char *xname)
|
||||
{
|
||||
TValue *o = narg < 0 ? L->top + narg : L->base + narg-1;
|
||||
const char *tname = o < L->top ? typename(o) : lj_obj_typename[0];
|
||||
const char *tname = o < L->top ? lj_typename(o) : lj_obj_typename[0];
|
||||
const char *msg = lj_str_pushf(L, err2msg(LJ_ERR_BADTYPE), xname, tname);
|
||||
err_argmsg(L, narg, msg);
|
||||
}
|
||||
|
@ -842,7 +842,7 @@ static LJ_AINLINE lua_Number numberVnum(cTValue *o)
|
||||
LJ_DATA const char *const lj_obj_typename[1+LUA_TCDATA+1];
|
||||
LJ_DATA const char *const lj_obj_itypename[~LJ_TNUMX+1];
|
||||
|
||||
#define typename(o) (lj_obj_itypename[itypemap(o)])
|
||||
#define lj_typename(o) (lj_obj_itypename[itypemap(o)])
|
||||
|
||||
/* Compare two objects without calling metamethods. */
|
||||
LJ_FUNC int lj_obj_equal(cTValue *o1, cTValue *o2);
|
||||
|
Loading…
Reference in New Issue
Block a user