diff options
author | CppCXY <812125110@qq.com> | 2024-02-22 20:29:13 +0800 |
---|---|---|
committer | CppCXY <812125110@qq.com> | 2024-02-22 20:29:13 +0800 |
commit | 9b6df71d97a70ee7179949ef9f15368cbf29dcbd (patch) | |
tree | bf7a7e62ed7c164a12bdce437c17262a5235bcec /meta/3rd/OpenResty/library/thread/exdata.lua | |
parent | 483fe246b6ae8c25d433aa15e43f04f0e71a74d5 (diff) | |
parent | 3e6fd3ce1f2f0528336ded939d776a29bbfaf2eb (diff) | |
download | lua-language-server-9b6df71d97a70ee7179949ef9f15368cbf29dcbd.zip |
Merge branch 'master' of github.com:CppCXY/lua-language-server
Diffstat (limited to 'meta/3rd/OpenResty/library/thread/exdata.lua')
m--------- | meta/3rd/OpenResty | 0 | ||||
-rw-r--r-- | meta/3rd/OpenResty/library/thread/exdata.lua | 43 |
2 files changed, 0 insertions, 43 deletions
diff --git a/meta/3rd/OpenResty b/meta/3rd/OpenResty new file mode 160000 +Subproject 3bec36f0f645bb38b3c8208990d5c36feb66ce3 diff --git a/meta/3rd/OpenResty/library/thread/exdata.lua b/meta/3rd/OpenResty/library/thread/exdata.lua deleted file mode 100644 index 22573d84..00000000 --- a/meta/3rd/OpenResty/library/thread/exdata.lua +++ /dev/null @@ -1,43 +0,0 @@ ----@meta - ---- **syntax:** *exdata = th_exdata(data?)* ---- ---- This API allows for embedding user data into a thread (`lua_State`). ---- ---- The retrieved `exdata` value on the Lua land is represented as a cdata object ---- of the ctype `void*`. ---- ---- As of this version, retrieving the `exdata` (i.e. `th_exdata()` without any ---- argument) can be JIT compiled. ---- ---- Usage: ---- ---- ```lua ---- local th_exdata = require "thread.exdata" ---- ---- th_exdata(0xdeadbeefLL) -- set the exdata of the current Lua thread ---- local exdata = th_exdata() -- fetch the exdata of the current Lua thread ---- ``` ---- ---- Also available are the following public C API functions for manipulating ---- `exdata` on the C land: ---- ---- ```C ---- void lua_setexdata(lua_State *L, void *exdata); ---- void *lua_getexdata(lua_State *L); ---- ``` ---- ---- The `exdata` pointer is initialized to `NULL` when the main thread is created. ---- Any child Lua thread will inherit its parent's `exdata`, but still can override ---- it. ---- ---- **Note:** This API will not be available if LuaJIT is compiled with ---- `-DLUAJIT_DISABLE_FFI`. ---- ---- **Note bis:** This API is used internally by the OpenResty core, and it is ---- strongly discouraged to use it yourself in the context of OpenResty. ----@param data? any ----@return any? data -local function exdata(data) end - -return exdata
\ No newline at end of file |