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/vc++/libs/LuaJIT-2.0.5/include/LuaJIT/lj_clib.h | |
parent | 1480c9445100075c9e1a894eb07c0ef727b509a1 (diff) |
*merge from minimal
Diffstat (limited to 'build/vc++/libs/LuaJIT-2.0.5/include/LuaJIT/lj_clib.h')
-rw-r--r-- | build/vc++/libs/LuaJIT-2.0.5/include/LuaJIT/lj_clib.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/build/vc++/libs/LuaJIT-2.0.5/include/LuaJIT/lj_clib.h b/build/vc++/libs/LuaJIT-2.0.5/include/LuaJIT/lj_clib.h new file mode 100644 index 0000000..fcc9dac --- /dev/null +++ b/build/vc++/libs/LuaJIT-2.0.5/include/LuaJIT/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 |