]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Avoid compiler warnings about redefined C++ keywords.
authorMike Pall <mike>
Mon, 9 Jul 2012 14:02:05 +0000 (16:02 +0200)
committerMike Pall <mike>
Mon, 9 Jul 2012 14:02:05 +0000 (16:02 +0200)
src/lib_base.c
src/lib_table.c
src/lj_carith.c
src/lj_cconv.c
src/lj_err.c
src/lj_obj.h

index 7539e92eb5763ae8e934ecc3448f0368174b88bc..383955d4b7cae08a396c59b248647414ef626549 100644 (file)
@@ -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);
     }
index 973daaed9f37eee0f695db892115c6f8017a11f4..5210544b905508080844604692eeb183caf6986e 100644 (file)
@@ -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)
index e1abf6e6ad13fd12163373adb43364a8755732ed..c5275f70e820b1c2be23a8e2886590db1d030ae6 100644 (file)
@@ -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 :
index 97091d08b190af7226458598e3046b9c994453ce..9964f8a48aa67ade06e9579ed07cb45d70c80614 100644 (file)
@@ -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
index 34736b3435f8ee59733e4aca986a9fac05e2b39f..3ee8cf4332424246a03921e0e25db40ebc15866f 100644 (file)
@@ -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);
 }
index 4ec67aeddb4a11a7e8460b0db188bf2fddc43840..137a04b2d9911ae7eaff6d5bb0deb27c7aa8b524 100644 (file)
@@ -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);