aboutsummaryrefslogtreecommitdiffstats
path: root/deps/LuaJIT/src/lj_obj.c
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-30 00:45:36 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-30 00:45:36 -0400
commitdc2493e7525bb7633f697ef10f72b72b46222249 (patch)
tree9816755219e65d3f47fdce81c78f3736a7ddb8ab /deps/LuaJIT/src/lj_obj.c
parent9d2b31797d0cfd130802b69261df2cd402e39b49 (diff)
Forget what I said, I just need to change git attributes to mark for vendor
Diffstat (limited to 'deps/LuaJIT/src/lj_obj.c')
-rw-r--r--deps/LuaJIT/src/lj_obj.c50
1 files changed, 0 insertions, 50 deletions
diff --git a/deps/LuaJIT/src/lj_obj.c b/deps/LuaJIT/src/lj_obj.c
deleted file mode 100644
index ee33aeb..0000000
--- a/deps/LuaJIT/src/lj_obj.c
+++ /dev/null
@@ -1,50 +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_FASTCALL 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);
-}
-
-/* Return pointer to object or its object data. */
-const void * LJ_FASTCALL lj_obj_ptr(cTValue *o)
-{
- if (tvisudata(o))
- return uddata(udataV(o));
- else if (tvislightud(o))
- return lightudV(o);
- else if (LJ_HASFFI && tviscdata(o))
- return cdataptr(cdataV(o));
- else if (tvisgcv(o))
- return gcV(o);
- else
- return NULL;
-}
-