Skip to content
Snippets Groups Projects
Verified Commit f7de661b authored by Yaroslav Dynnikov's avatar Yaroslav Dynnikov
Browse files

Refactor stash

As we recently discovered, Tarantool has a peculiarity - when calling
stored procedures with `{language = "C"}` option, it disregards the
shared object (`.so` / `.dylib`) already loaded by Lua and makes the
second independent `dlopen`. As a result, Lua and C stored procedures
can't share state, because even static variables point to different
memory locations.

As a workaround, this patch provides the API for hiding the state inside
`lua_State`. Under the hood, the stash consumes a custom struct and
leaks the wrapping box. Inside Lua, it's represented by a userdata,
which the `access()` function provides access to.
parent 795208c1
No related branches found
No related tags found
1 merge request!18Refactor stash
Pipeline #3444 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment