Minor changes and https-ify links.

This commit is contained in:
Mike Pall
2020-10-12 16:11:32 +02:00
parent 5c46f47736
commit 050466552b
18 changed files with 47 additions and 47 deletions

View File

@@ -668,7 +668,7 @@ through unions is explicitly detected and allowed.
<a href="ext_ffi_api.html#ffi_new">constructor</a>. This is equivalent
to <tt>ffi.new(ct, ...)</tt>, unless a <tt>__new</tt> metamethod is
defined. The <tt>__new</tt> metamethod is called with the ctype object
plus any other arguments passed to the contructor. Note that you have to
plus any other arguments passed to the constructor. Note that you have to
use <tt>ffi.new</tt> inside of it, since calling <tt>ct(...)</tt> would
cause infinite recursion.</li>
@@ -838,7 +838,7 @@ place of a type, you'd need to use <tt>ffi.typeof("int")</tt> instead.
<p>
The main use for parameterized types are libraries implementing abstract
data types
(<a href="https://www.freelists.org/post/luajit/ffi-type-of-pointer-to,8">example</a>),
(<a href="https://www.freelists.org/post/luajit/ffi-type-of-pointer-to,8"><span class="ext">&raquo;</span>&nbsp;example</a>),
similar to what can be achieved with C++ template metaprogramming.
Another use case are derived types of anonymous structs, which avoids
pollution of the global struct namespace.