summaryrefslogtreecommitdiff
path: root/src/lj_clib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_clib.h')
-rw-r--r--src/lj_clib.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/lj_clib.h b/src/lj_clib.h
new file mode 100644
index 00000000..86045d24
--- /dev/null
+++ b/src/lj_clib.h
@@ -0,0 +1,26 @@
1/*
2** FFI C library loader.
3** Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h
4*/
5
6#ifndef _LJ_CLIB_H
7#define _LJ_CLIB_H
8
9#include "lj_obj.h"
10
11#if LJ_HASFFI
12
13/* C library namespace. */
14typedef struct CLibrary {
15 void *handle; /* Opaque handle for dynamic library loader. */
16 GCtab *cache; /* Cache for resolved symbols. Anchored in ud->env. */
17} CLibrary;
18
19LJ_FUNC TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name);
20LJ_FUNC void lj_clib_load(lua_State *L, GCtab *mt, GCstr *name, int global);
21LJ_FUNC void lj_clib_unload(CLibrary *cl);
22LJ_FUNC void lj_clib_default(lua_State *L, GCtab *mt);
23
24#endif
25
26#endif