aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2012-07-09 16:02:05 +0200
committerMike Pall <mike>2012-07-09 16:02:05 +0200
commitf20ff8a30dbec50bc20b47702c4c61c08f67bd5b (patch)
tree24829aa879eeaf94ecaa2d6dfe2bc53357a01562 /src
parent6e4d0fdc8e8121fac45d85661c638093fbfd1e3a (diff)
downloadluajit-f20ff8a30dbec50bc20b47702c4c61c08f67bd5b.tar.gz
luajit-f20ff8a30dbec50bc20b47702c4c61c08f67bd5b.tar.bz2
luajit-f20ff8a30dbec50bc20b47702c4c61c08f67bd5b.zip
Avoid compiler warnings about redefined C++ keywords.
Diffstat (limited to 'src')
-rw-r--r--src/lib_base.c2
-rw-r--r--src/lib_table.c2
-rw-r--r--src/lj_carith.c2
-rw-r--r--src/lj_cconv.c2
-rw-r--r--src/lj_err.c10
-rw-r--r--src/lj_obj.h2
6 files changed, 10 insertions, 10 deletions
diff --git a/src/lib_base.c b/src/lib_base.c
index 7539e92e..383955d4 100644
--- a/src/lib_base.c
+++ b/src/lib_base.c
@@ -257,7 +257,7 @@ LJLIB_ASM(tostring) LJLIB_REC(.)
257 if (tvisfunc(o) && isffunc(funcV(o))) 257 if (tvisfunc(o) && isffunc(funcV(o)))
258 lua_pushfstring(L, "function: fast#%d", funcV(o)->c.ffid); 258 lua_pushfstring(L, "function: fast#%d", funcV(o)->c.ffid);
259 else 259 else
260 lua_pushfstring(L, "%s: %p", typename(o), lua_topointer(L, 1)); 260 lua_pushfstring(L, "%s: %p", lj_typename(o), lua_topointer(L, 1));
261 /* Note: lua_pushfstring calls the GC which may invalidate o. */ 261 /* Note: lua_pushfstring calls the GC which may invalidate o. */
262 s = strV(L->top-1); 262 s = strV(L->top-1);
263 } 263 }
diff --git a/src/lib_table.c b/src/lib_table.c
index 973daaed..5210544b 100644
--- a/src/lib_table.c
+++ b/src/lib_table.c
@@ -157,7 +157,7 @@ LJLIB_CF(table_concat)
157 lua_rawgeti(L, 1, i); 157 lua_rawgeti(L, 1, i);
158 o = L->top-1; 158 o = L->top-1;
159 if (!(tvisstr(o) || tvisnumber(o))) 159 if (!(tvisstr(o) || tvisnumber(o)))
160 lj_err_callerv(L, LJ_ERR_TABCAT, typename(o), i); 160 lj_err_callerv(L, LJ_ERR_TABCAT, lj_typename(o), i);
161 luaL_addvalue(&b); 161 luaL_addvalue(&b);
162 if (i++ == e) break; 162 if (i++ == e) break;
163 if (seplen) 163 if (seplen)
diff --git a/src/lj_carith.c b/src/lj_carith.c
index e1abf6e6..c5275f70 100644
--- a/src/lj_carith.c
+++ b/src/lj_carith.c
@@ -213,7 +213,7 @@ static int lj_carith_meta(lua_State *L, CTState *cts, CDArith *ca, MMS mm)
213 if (ca->ct[i]) 213 if (ca->ct[i])
214 repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL)); 214 repr[i] = strdata(lj_ctype_repr(L, ctype_typeid(cts, ca->ct[i]), NULL));
215 else 215 else
216 repr[i] = typename(&L->base[i]); 216 repr[i] = lj_typename(&L->base[i]);
217 } 217 }
218 lj_err_callerv(L, mm == MM_len ? LJ_ERR_FFI_BADLEN : 218 lj_err_callerv(L, mm == MM_len ? LJ_ERR_FFI_BADLEN :
219 mm == MM_concat ? LJ_ERR_FFI_BADCONCAT : 219 mm == MM_concat ? LJ_ERR_FFI_BADCONCAT :
diff --git a/src/lj_cconv.c b/src/lj_cconv.c
index 97091d08..9964f8a4 100644
--- a/src/lj_cconv.c
+++ b/src/lj_cconv.c
@@ -38,7 +38,7 @@ LJ_NORET static void cconv_err_convtv(CTState *cts, CType *d, TValue *o,
38 CTInfo flags) 38 CTInfo flags)
39{ 39{
40 const char *dst = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, d), NULL)); 40 const char *dst = strdata(lj_ctype_repr(cts->L, ctype_typeid(cts, d), NULL));
41 const char *src = typename(o); 41 const char *src = lj_typename(o);
42 if (CCF_GETARG(flags)) 42 if (CCF_GETARG(flags))
43 lj_err_argv(cts->L, CCF_GETARG(flags), LJ_ERR_FFI_BADCONV, src, dst); 43 lj_err_argv(cts->L, CCF_GETARG(flags), LJ_ERR_FFI_BADCONV, src, dst);
44 else 44 else
diff --git a/src/lj_err.c b/src/lj_err.c
index 34736b34..3ee8cf43 100644
--- a/src/lj_err.c
+++ b/src/lj_err.c
@@ -598,7 +598,7 @@ LJ_NOINLINE void lj_err_lex(lua_State *L, GCstr *src, const char *tok,
598/* Typecheck error for operands. */ 598/* Typecheck error for operands. */
599LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm) 599LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm)
600{ 600{
601 const char *tname = typename(o); 601 const char *tname = lj_typename(o);
602 const char *opname = err2msg(opm); 602 const char *opname = err2msg(opm);
603 if (curr_funcisL(L)) { 603 if (curr_funcisL(L)) {
604 GCproto *pt = curr_proto(L); 604 GCproto *pt = curr_proto(L);
@@ -614,8 +614,8 @@ LJ_NOINLINE void lj_err_optype(lua_State *L, cTValue *o, ErrMsg opm)
614/* Typecheck error for ordered comparisons. */ 614/* Typecheck error for ordered comparisons. */
615LJ_NOINLINE void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2) 615LJ_NOINLINE void lj_err_comp(lua_State *L, cTValue *o1, cTValue *o2)
616{ 616{
617 const char *t1 = typename(o1); 617 const char *t1 = lj_typename(o1);
618 const char *t2 = typename(o2); 618 const char *t2 = lj_typename(o2);
619 err_msgv(L, t1 == t2 ? LJ_ERR_BADCMPV : LJ_ERR_BADCMPT, t1, t2); 619 err_msgv(L, t1 == t2 ? LJ_ERR_BADCMPV : LJ_ERR_BADCMPT, t1, t2);
620 /* This assumes the two "boolean" entries are commoned by the C compiler. */ 620 /* This assumes the two "boolean" entries are commoned by the C compiler. */
621} 621}
@@ -629,7 +629,7 @@ LJ_NOINLINE void lj_err_optype_call(lua_State *L, TValue *o)
629 */ 629 */
630 const BCIns *pc = cframe_Lpc(L); 630 const BCIns *pc = cframe_Lpc(L);
631 if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) { 631 if (((ptrdiff_t)pc & FRAME_TYPE) != FRAME_LUA) {
632 const char *tname = typename(o); 632 const char *tname = lj_typename(o);
633 setframe_pc(o, pc); 633 setframe_pc(o, pc);
634 setframe_gc(o, obj2gco(L)); 634 setframe_gc(o, obj2gco(L));
635 L->top = L->base = o+1; 635 L->top = L->base = o+1;
@@ -722,7 +722,7 @@ LJ_NOINLINE void lj_err_arg(lua_State *L, int narg, ErrMsg em)
722LJ_NOINLINE void lj_err_argtype(lua_State *L, int narg, const char *xname) 722LJ_NOINLINE void lj_err_argtype(lua_State *L, int narg, const char *xname)
723{ 723{
724 TValue *o = narg < 0 ? L->top + narg : L->base + narg-1; 724 TValue *o = narg < 0 ? L->top + narg : L->base + narg-1;
725 const char *tname = o < L->top ? typename(o) : lj_obj_typename[0]; 725 const char *tname = o < L->top ? lj_typename(o) : lj_obj_typename[0];
726 const char *msg = lj_str_pushf(L, err2msg(LJ_ERR_BADTYPE), xname, tname); 726 const char *msg = lj_str_pushf(L, err2msg(LJ_ERR_BADTYPE), xname, tname);
727 err_argmsg(L, narg, msg); 727 err_argmsg(L, narg, msg);
728} 728}
diff --git a/src/lj_obj.h b/src/lj_obj.h
index 4ec67aed..137a04b2 100644
--- a/src/lj_obj.h
+++ b/src/lj_obj.h
@@ -842,7 +842,7 @@ static LJ_AINLINE lua_Number numberVnum(cTValue *o)
842LJ_DATA const char *const lj_obj_typename[1+LUA_TCDATA+1]; 842LJ_DATA const char *const lj_obj_typename[1+LUA_TCDATA+1];
843LJ_DATA const char *const lj_obj_itypename[~LJ_TNUMX+1]; 843LJ_DATA const char *const lj_obj_itypename[~LJ_TNUMX+1];
844 844
845#define typename(o) (lj_obj_itypename[itypemap(o)]) 845#define lj_typename(o) (lj_obj_itypename[itypemap(o)])
846 846
847/* Compare two objects without calling metamethods. */ 847/* Compare two objects without calling metamethods. */
848LJ_FUNC int lj_obj_equal(cTValue *o1, cTValue *o2); 848LJ_FUNC int lj_obj_equal(cTValue *o1, cTValue *o2);