diff options
author | chai <chaifix@163.com> | 2018-10-23 12:23:58 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-10-23 12:23:58 +0800 |
commit | 40fc27154fe754181934dc7ee31375e6bdfb33fc (patch) | |
tree | 897ad98d759bc308ef66561181ba88b85f2ccd47 /build/vs2015/libs/LuaJIT-2.0.5/src/lj_obj.c | |
parent | 1480c9445100075c9e1a894eb07c0ef727b509a1 (diff) |
*merge from minimal
Diffstat (limited to 'build/vs2015/libs/LuaJIT-2.0.5/src/lj_obj.c')
-rw-r--r-- | build/vs2015/libs/LuaJIT-2.0.5/src/lj_obj.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/build/vs2015/libs/LuaJIT-2.0.5/src/lj_obj.c b/build/vs2015/libs/LuaJIT-2.0.5/src/lj_obj.c deleted file mode 100644 index 4779d26..0000000 --- a/build/vs2015/libs/LuaJIT-2.0.5/src/lj_obj.c +++ /dev/null @@ -1,35 +0,0 @@ -/* -** Miscellaneous object handling. -** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h -*/ - -#define lj_obj_c -#define LUA_CORE - -#include "lj_obj.h" - -/* Object type names. */ -LJ_DATADEF const char *const lj_obj_typename[] = { /* ORDER LUA_T */ - "no value", "nil", "boolean", "userdata", "number", "string", - "table", "function", "userdata", "thread", "proto", "cdata" -}; - -LJ_DATADEF const char *const lj_obj_itypename[] = { /* ORDER LJ_T */ - "nil", "boolean", "boolean", "userdata", "string", "upval", "thread", - "proto", "function", "trace", "cdata", "table", "userdata", "number" -}; - -/* Compare two objects without calling metamethods. */ -int lj_obj_equal(cTValue *o1, cTValue *o2) -{ - if (itype(o1) == itype(o2)) { - if (tvispri(o1)) - return 1; - if (!tvisnum(o1)) - return gcrefeq(o1->gcr, o2->gcr); - } else if (!tvisnumber(o1) || !tvisnumber(o2)) { - return 0; - } - return numberVnum(o1) == numberVnum(o2); -} - |