aboutsummaryrefslogtreecommitdiff
path: root/doc/ext_ffi_semantics.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ext_ffi_semantics.html')
-rw-r--r--doc/ext_ffi_semantics.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html
index ce6313d7..c95407b7 100644
--- a/doc/ext_ffi_semantics.html
+++ b/doc/ext_ffi_semantics.html
@@ -668,7 +668,7 @@ through unions is explicitly detected and allowed.
668<a href="ext_ffi_api.html#ffi_new">constructor</a>. This is equivalent 668<a href="ext_ffi_api.html#ffi_new">constructor</a>. This is equivalent
669to <tt>ffi.new(ct, ...)</tt>, unless a <tt>__new</tt> metamethod is 669to <tt>ffi.new(ct, ...)</tt>, unless a <tt>__new</tt> metamethod is
670defined. The <tt>__new</tt> metamethod is called with the ctype object 670defined. The <tt>__new</tt> metamethod is called with the ctype object
671plus any other arguments passed to the contructor. Note that you have to 671plus any other arguments passed to the constructor. Note that you have to
672use <tt>ffi.new</tt> inside of it, since calling <tt>ct(...)</tt> would 672use <tt>ffi.new</tt> inside of it, since calling <tt>ct(...)</tt> would
673cause infinite recursion.</li> 673cause infinite recursion.</li>
674 674
@@ -838,7 +838,7 @@ place of a type, you'd need to use <tt>ffi.typeof("int")</tt> instead.
838<p> 838<p>
839The main use for parameterized types are libraries implementing abstract 839The main use for parameterized types are libraries implementing abstract
840data types 840data types
841(<a href="https://www.freelists.org/post/luajit/ffi-type-of-pointer-to,8">example</a>), 841(<a href="https://www.freelists.org/post/luajit/ffi-type-of-pointer-to,8"><span class="ext">&raquo;</span>&nbsp;example</a>),
842similar to what can be achieved with C++ template metaprogramming. 842similar to what can be achieved with C++ template metaprogramming.
843Another use case are derived types of anonymous structs, which avoids 843Another use case are derived types of anonymous structs, which avoids
844pollution of the global struct namespace. 844pollution of the global struct namespace.