From f00c77d497bc2b5f4dd55f4b21c645ea729eca70 Mon Sep 17 00:00:00 2001
From: Benoit Germain
Date: Mon, 25 Mar 2024 09:51:56 +0100
Subject: C++ migration: make deep_test build and run
---
docs/index.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
(limited to 'docs')
diff --git a/docs/index.html b/docs/index.html
index aed022a..e9c3239 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -917,7 +917,7 @@
- Only available if lane tracking feature is compiled (see HAVE_LANE_TRACKING in lanes.c) and track_lanes is set.
+ Only available if lane tracking feature is compiled (see HAVE_LANE_TRACKING in lanes.cpp) and track_lanes is set.
Returns an array table where each entry is a table containing a lane's name and status. Returns nil if no lane is running.
@@ -1702,9 +1702,9 @@ int luaD_new_clonable( lua_State* L)
eDO_metatable: should build a metatable for the object. Don't cache the metatable yourself, Lanes takes care of it (eDO_metatable should only be invoked once per state). Just push the metatable on the stack.
eDO_module: requests the name of the module that exports the idfunc, to be returned. It is necessary so that Lanes can require it in any lane state that receives a userdata. This is to prevent crashes in situations where the module could be unloaded while the idfunc pointer is still held.
- Take a look at linda_id in lanes.c or deep_test_id in deep_test.c.
+ Take a look at linda_id in lanes.cpp or deep_test_id in deep_test.cpp.
- Include "deep.h" and either link against Lanes or statically compile compat.c deep.c tools.c universe.c into your module if you want to avoid a runtime dependency for users that will use your module without Lanes.
+ Include "deep.h" and either link against Lanes or statically compile compat.cpp deep.cpp tools.cpp universe.cpp into your module if you want to avoid a runtime dependency for users that will use your module without Lanes.
Instanciate your userdata using luaG_newdeepuserdata(), instead of the regular lua_newuserdata(). Given an idfunc, it sets up the support structures and returns a state-specific proxy userdata for accessing your data. This proxy can also be copied over to other lanes.
Accessing the deep userdata from your C code, use luaG_todeep() instead of the regular lua_touserdata().
@@ -1724,7 +1724,7 @@ int luaD_new_clonable( lua_State* L)
- NOTE: The lifespan of deep userdata may exceed that of the Lua state that created it. The allocation of the data storage should not be tied to the Lua state used. In other words, use malloc()/free() or similar memory handling mechanism.
+ NOTE: The lifespan of deep userdata may exceed that of the Lua state that created it. The allocation of the data storage should not be tied to the Lua state used. In other words, use new/delete, malloc()/free() or similar memory handling mechanism.
@@ -1812,4 +1812,4 @@ int luaD_new_clonable( lua_State* L)