| ... | ... | @@ -9322,6 +9322,13 @@ const c = @cImport({ |
| 9322 | 9322 | <li>Does not support Zig-only pointer attributes such as alignment. Use normal {#link|Pointers#} |
| 9323 | 9323 | please!</li> |
| 9324 | 9324 | </ul> |
| 9325 | <p>When a C pointer is pointing to a single struct (not an array), deference the C pointer to |
| 9326 | access to the struct's fields or member data. That syntax looks like |
| 9327 | this: </p> |
| 9328 | <p>{#syntax#}ptr_to_struct.*.struct_member{#endsyntax#}</p> |
| 9329 | <p>This is comparable to doing {#syntax#}->{#endsyntax#} in C.</p> |
| 9330 | <p> When a C pointer is pointing to an array of structs, the syntax reverts to this:</p> |
| 9331 | <p>{#syntax#}ptr_to_struct_array[index].struct_member{#endsyntax#}</p> |
| 9325 | 9332 | {#header_close#} |
| 9326 | 9333 | |
| 9327 | 9334 | {#header_open|Exporting a C Library#} |