aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBenoit Germain <benoit.germain@ubisoft.com>2024-06-18 10:06:53 +0200
committerBenoit Germain <benoit.germain@ubisoft.com>2024-06-18 10:06:53 +0200
commit3229fa753cef10eda963247eaedec1d6ed9de9e4 (patch)
tree6b8ab7c1895aee63e4db3cca0b38c9a812430a2f /docs
parente3818609b54c81a83aa73beb322ea9c282b7add8 (diff)
downloadlanes-3229fa753cef10eda963247eaedec1d6ed9de9e4.tar.gz
lanes-3229fa753cef10eda963247eaedec1d6ed9de9e4.tar.bz2
lanes-3229fa753cef10eda963247eaedec1d6ed9de9e4.zip
Moved AllocatorDefinition in a lanes namespace
Diffstat (limited to 'docs')
-rw-r--r--docs/index.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/index.html b/docs/index.html
index fe92565..4a9fc35 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -289,11 +289,17 @@
289 <td> 289 <td>
290 If <tt>nil</tt>, Lua states are created with <tt>lua_newstate()</tt> and reuse the allocator from the master state.<br /> 290 If <tt>nil</tt>, Lua states are created with <tt>lua_newstate()</tt> and reuse the allocator from the master state.<br />
291 If <tt>"protected"</tt>, The default allocator obtained from <tt>lua_getallocf()</tt> in the master state is wrapped inside a critical section and used in all newly created states.<br /> 291 If <tt>"protected"</tt>, The default allocator obtained from <tt>lua_getallocf()</tt> in the master state is wrapped inside a critical section and used in all newly created states.<br />
292 If a <tt>function</tt>, this function is called prior to creating the state, with a single string argument, either <tt>"keeper"</tt> or <tt>"lane"</tt>. It should return a full userdata containing the following structure: 292 If a <tt>function</tt>, this function is called prior to creating the state, with a single string argument, either <tt>"keeper"</tt> or <tt>"lane"</tt>. It should return a full userdata created as follows:
293 <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%"> 293 <table border="1" bgcolor="#E0E0FF" cellpadding="10" style="width:50%">
294 <tr> 294 <tr>
295 <td> 295 <td>
296 <pre> struct { uintptr_t version { AllocatorDefinition::kAllocatorVersion }; lua_Alloc allocF; void* allocUD; }</pre> 296 <pre>
297 static constexpr lua_CFunction _provideAllocator = +[](lua_State* const L_) {
298 lanes::AllocatorDefinition* const _def{ new (L_) lanes::AllocatorDefinition{} };
299 // populate _def->allocF and _def->allocUD here
300 return 1;
301 };
302 </pre>
297 </td> 303 </td>
298 </tr> 304 </tr>
299 </table> 305 </table>