From 17ca8b54fdc0aa2df875fc7b80def4dd56959d7f Mon Sep 17 00:00:00 2001 From: Benoit Germain Date: Thu, 23 May 2024 08:35:40 +0200 Subject: on_state_create receives a string argument, "lane" or "keeper" --- docs/index.html | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'docs/index.html') diff --git a/docs/index.html b/docs/index.html index d0b06ae..47dc47c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -400,20 +400,16 @@ function/nil - If provided, will be called in every created Lua state right after initializing the base libraries. -
- Keeper states will call it as well, but only if it is a C function (keeper states are not able to execute any user Lua code). -
+ If provided, will be called in every created Lua state right after initializing the base libraries, with a single string argument, either "lane" or "keeper".
+ If it is a C function, a C closure will be reconstructed in the created state from the C pointer. Lanes will raise an error if the function has upvalues.
+ Keeper states will call it as well, but only if it is a C function (keeper states are not able to execute any user Lua code).
Typical usage is twofold: - That way, all changes in the state can be properly taken into account when building the function lookup database. Default is nil. -
- If on_state_create() is a Lua function, it will be transfered normally before the call. -
- If it is a C function, a C closure will be reconstructed in the created state from the C pointer. Lanes will raise an error if the function has upvalues. + That way, all changes in the state can be properly taken into account when building the function lookup database. Default is nil.
+ If on_state_create() is a Lua function, it will be transfered normally before the call.
-- cgit v1.2.3-55-g6feb