diff options
| author | Mike Pall <mike> | 2020-10-12 16:18:02 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2020-10-12 16:18:02 +0200 |
| commit | 1d8b747c161db457e032a023ebbff511f5de5ec2 (patch) | |
| tree | 7254328c720b104f5d5b4bd8321cfcb18c6fb6ce /doc/ext_ffi_semantics.html | |
| parent | 675e08cf069725a004284b4e1e67fbf0e8fcb4dd (diff) | |
| parent | 050466552bf7eb8b7944aa52c93b45326ae14d7a (diff) | |
| download | luajit-1d8b747c161db457e032a023ebbff511f5de5ec2.tar.gz luajit-1d8b747c161db457e032a023ebbff511f5de5ec2.tar.bz2 luajit-1d8b747c161db457e032a023ebbff511f5de5ec2.zip | |
Merge branch 'master' into v2.1
Diffstat (limited to 'doc/ext_ffi_semantics.html')
| -rw-r--r-- | doc/ext_ffi_semantics.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index 5415787d..7c4f0d1d 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html | |||
| @@ -672,7 +672,7 @@ through unions is explicitly detected and allowed. | |||
| 672 | <a href="ext_ffi_api.html#ffi_new">constructor</a>. This is equivalent | 672 | <a href="ext_ffi_api.html#ffi_new">constructor</a>. This is equivalent |
| 673 | to <tt>ffi.new(ct, ...)</tt>, unless a <tt>__new</tt> metamethod is | 673 | to <tt>ffi.new(ct, ...)</tt>, unless a <tt>__new</tt> metamethod is |
| 674 | defined. The <tt>__new</tt> metamethod is called with the ctype object | 674 | defined. The <tt>__new</tt> metamethod is called with the ctype object |
| 675 | plus any other arguments passed to the contructor. Note that you have to | 675 | plus any other arguments passed to the constructor. Note that you have to |
| 676 | use <tt>ffi.new</tt> inside of it, since calling <tt>ct(...)</tt> would | 676 | use <tt>ffi.new</tt> inside of it, since calling <tt>ct(...)</tt> would |
| 677 | cause infinite recursion.</li> | 677 | cause infinite recursion.</li> |
| 678 | 678 | ||
| @@ -858,7 +858,7 @@ place of a type, you'd need to use <tt>ffi.typeof("int")</tt> instead. | |||
| 858 | <p> | 858 | <p> |
| 859 | The main use for parameterized types are libraries implementing abstract | 859 | The main use for parameterized types are libraries implementing abstract |
| 860 | data types | 860 | data types |
| 861 | (<a href="https://www.freelists.org/post/luajit/ffi-type-of-pointer-to,8">example</a>), | 861 | (<a href="https://www.freelists.org/post/luajit/ffi-type-of-pointer-to,8"><span class="ext">»</span> example</a>), |
| 862 | similar to what can be achieved with C++ template metaprogramming. | 862 | similar to what can be achieved with C++ template metaprogramming. |
| 863 | Another use case are derived types of anonymous structs, which avoids | 863 | Another use case are derived types of anonymous structs, which avoids |
| 864 | pollution of the global struct namespace. | 864 | pollution of the global struct namespace. |
