Mercurial
comparison third_party/luajit/src/lj_clib.h @ 186:8cf4ec5e2191 hg-web
Fixed merge conflict.
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Fri, 23 Jan 2026 22:38:59 -0800 |
| parents | 94705b5986b3 |
| children |
comparison
equal
deleted
inserted
replaced
| 176:fed99fc04e12 | 186:8cf4ec5e2191 |
|---|---|
| 1 /* | |
| 2 ** FFI C library loader. | |
| 3 ** Copyright (C) 2005-2023 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 /* Namespace for C library indexing. */ | |
| 14 #define CLNS_INDEX ((1u<<CT_FUNC)|(1u<<CT_EXTERN)|(1u<<CT_CONSTVAL)) | |
| 15 | |
| 16 /* C library namespace. */ | |
| 17 typedef struct CLibrary { | |
| 18 void *handle; /* Opaque handle for dynamic library loader. */ | |
| 19 GCtab *cache; /* Cache for resolved symbols. Anchored in ud->env. */ | |
| 20 } CLibrary; | |
| 21 | |
| 22 LJ_FUNC TValue *lj_clib_index(lua_State *L, CLibrary *cl, GCstr *name); | |
| 23 LJ_FUNC void lj_clib_load(lua_State *L, GCtab *mt, GCstr *name, int global); | |
| 24 LJ_FUNC void lj_clib_unload(CLibrary *cl); | |
| 25 LJ_FUNC void lj_clib_default(lua_State *L, GCtab *mt); | |
| 26 | |
| 27 #endif | |
| 28 | |
| 29 #endif |