diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/docs/index.html b/docs/index.html index 8385480..19cc442 100644 --- a/docs/index.html +++ b/docs/index.html | |||
@@ -958,7 +958,7 @@ | |||
958 | </table> | 958 | </table> |
959 | 959 | ||
960 | <p> | 960 | <p> |
961 | Only available if lane tracking feature is compiled (see <tt>HAVE_LANE_TRACKING</tt> in <tt>lanes.cpp</tt>) and <a href="#track_lanes"><tt>track_lanes</tt></a> is set. | 961 | Only available if lane tracking is enabled by setting <a href="#track_lanes"><tt>track_lanes</tt></a>. |
962 | <br/> | 962 | <br/> |
963 | Returns an array table where each entry is a table containing a lane's name and status. Returns <tt>nil</tt> if no lane is running. | 963 | Returns an array table where each entry is a table containing a lane's name and status. Returns <tt>nil</tt> if no lane is running. |
964 | </p> | 964 | </p> |
@@ -1743,9 +1743,9 @@ class MyDeepFactory : public DeepFactory | |||
1743 | { | 1743 | { |
1744 | private: | 1744 | private: |
1745 | 1745 | ||
1746 | DeepPrelude* newDeepObjectInternal(lua_State* L) const override; | 1746 | void createMetatable(lua_State* const L_) const override; |
1747 | void deleteDeepObjectInternal(lua_State* L, DeepPrelude* o_) const override; | 1747 | void deleteDeepObjectInternal(lua_State* const L_, DeepPrelude* o_) const override; |
1748 | void createMetatable(lua_State* L) const override; | 1748 | DeepPrelude* newDeepObjectInternal(lua_State* const L_) const override; |
1749 | std::string_view moduleName() const override; | 1749 | std::string_view moduleName() const override; |
1750 | }; | 1750 | }; |
1751 | 1751 | ||
@@ -1757,7 +1757,7 @@ static MyDeepFactory g_MyDeepFactory; | |||
1757 | <li><tt>createMetatable</tt>: should build a metatable for the object. Don't cache the metatable yourself, Lanes takes care of it (<tt>createMetatable</tt> should only be invoked once per state). Just push the metatable on the stack.</li> | 1757 | <li><tt>createMetatable</tt>: should build a metatable for the object. Don't cache the metatable yourself, Lanes takes care of it (<tt>createMetatable</tt> should only be invoked once per state). Just push the metatable on the stack.</li> |
1758 | <li><tt>moduleName</tt>: requests the name of the module that exports the factory, 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 factory pointer is still held.</li> | 1758 | <li><tt>moduleName</tt>: requests the name of the module that exports the factory, 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 factory pointer is still held.</li> |
1759 | </ul> | 1759 | </ul> |
1760 | Take a look at <tt>LindaFactory</tt> in <tt>linda.cpp</tt> or <tt>MyDeepFactory</tt> in <tt>deep_test.cpp</tt>. | 1760 | Take a look at <tt>LindaFactory</tt> in <tt>lindafactory.cpp</tt> or <tt>MyDeepFactory</tt> in <tt>deep_test.cpp</tt>. |
1761 | </li> | 1761 | </li> |
1762 | <li>Include <tt>"deep.h"</tt> and either link against Lanes or statically compile <tt>compat.cpp deep.cpp</tt> into your module if you want to avoid a runtime dependency for users that will use your module without Lanes. | 1762 | <li>Include <tt>"deep.h"</tt> and either link against Lanes or statically compile <tt>compat.cpp deep.cpp</tt> into your module if you want to avoid a runtime dependency for users that will use your module without Lanes. |
1763 | <li>Instanciate your userdata using <tt>yourFactoryObject.pushDeepUserdata()</tt>, instead of the regular <tt>lua_newuserdata()</tt>. Given a <tt>factory</tt>, 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.</li> | 1763 | <li>Instanciate your userdata using <tt>yourFactoryObject.pushDeepUserdata()</tt>, instead of the regular <tt>lua_newuserdata()</tt>. Given a <tt>factory</tt>, 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.</li> |