aboutsummaryrefslogtreecommitdiffstats
path: root/lib/LuaJIT/src/lj_clib.h
diff options
context:
space:
mode:
authorAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-25 16:39:02 -0400
committerAndy Belle-Isle <drumsetmonkey@gmail.com>2019-08-25 16:39:02 -0400
commitbb283f4581ac07a4dd75325c4343d7f28b1ff376 (patch)
treef3892f8b77177149ae0294e7241d2ecaf58b64a6 /lib/LuaJIT/src/lj_clib.h
parentd48436bbf5032484ff7d9c2667a63672e306ca18 (diff)
Fixed LuaJIT files
Diffstat (limited to 'lib/LuaJIT/src/lj_clib.h')
-rw-r--r--lib/LuaJIT/src/lj_clib.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/LuaJIT/src/lj_clib.h b/lib/LuaJIT/src/lj_clib.h
new file mode 100644
index 0000000..fcc9dac
--- /dev/null
+++ b/lib/LuaJIT/src/lj_clib.h
@@ -0,0 +1,29 @@
+/*
+** FFI C library loader.
+** Copyright (C) 2005-2017 Mike Pall. See Copyright Notice in luajit.h
+*/
+
+#ifndef _LJ_CLIB_H
+#define _LJ_CLIB_H
+
+#include "lj_obj.h"
+
+#if LJ_HASFFI
+
+/* Namespace for C library indexing. */
+#define CLNS_INDEX ((1u<<CT_FUNC)|(1u<<CT_EXTERN)|(1u<<CT_CONSTVAL))
+
+/* C library namespace. */
+typedef struct CLibrary {
+ void *handle; /* Opaque handle for dynamic library loader. */
+ GCtab *cache; /* Cache for resolved symbols. Anchored in ud->env. */
+} CLibrary;
+
+LJ_FUNC TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name);
+LJ_FUNC void lj_clib_load(lua_State *L, GCtab *mt, GCstr *name, int global);
+LJ_FUNC void lj_clib_unload(CLibrary *cl);
+LJ_FUNC void lj_clib_default(lua_State *L, GCtab *mt);
+
+#endif
+
+#endif