diff options
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/ext_ffi_semantics.html | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/ext_ffi_semantics.html b/doc/ext_ffi_semantics.html index bf9f9bee..30aa9648 100644 --- a/doc/ext_ffi_semantics.html +++ b/doc/ext_ffi_semantics.html | |||
| @@ -517,17 +517,17 @@ A VLA is only initialized with the element(s) given in the table. | |||
| 517 | Depending on the use case, you may need to explicitly add a | 517 | Depending on the use case, you may need to explicitly add a |
| 518 | <tt>NULL</tt> or <tt>0</tt> terminator to a VLA.</li> | 518 | <tt>NULL</tt> or <tt>0</tt> terminator to a VLA.</li> |
| 519 | 519 | ||
| 520 | <li>If the table has a non-empty hash part, a | 520 | <li>A <tt>struct</tt>/<tt>union</tt> can be initialized in the |
| 521 | <tt>struct</tt>/<tt>union</tt> is initialized by looking up each field | ||
| 522 | name (as a string key) in the table. Each non-<tt>nil</tt> value is | ||
| 523 | used to initialize the corresponding field.</li> | ||
| 524 | |||
| 525 | <li>Otherwise a <tt>struct</tt>/<tt>union</tt> is initialized in the | ||
| 526 | order of the declaration of its fields. Each field is initialized with | 521 | order of the declaration of its fields. Each field is initialized with |
| 527 | the consecutive table elements, starting at either index <tt>[0]</tt> | 522 | consecutive table elements, starting at either index <tt>[0]</tt> |
| 528 | or <tt>[1]</tt>. This process stops at the first <tt>nil</tt> table | 523 | or <tt>[1]</tt>. This process stops at the first <tt>nil</tt> table |
| 529 | element.</li> | 524 | element.</li> |
| 530 | 525 | ||
| 526 | <li>Otherwise, if neither index <tt>[0]</tt> nor <tt>[1]</tt> is present, | ||
| 527 | a <tt>struct</tt>/<tt>union</tt> is initialized by looking up each field | ||
| 528 | name (as a string key) in the table. Each non-<tt>nil</tt> value is | ||
| 529 | used to initialize the corresponding field.</li> | ||
| 530 | |||
| 531 | <li>Uninitialized fields of a <tt>struct</tt> are filled with zero | 531 | <li>Uninitialized fields of a <tt>struct</tt> are filled with zero |
| 532 | bytes, except for the trailing VLA of a VLS.</li> | 532 | bytes, except for the trailing VLA of a VLS.</li> |
| 533 | 533 | ||
