| ... | @@ -2582,7 +2582,7 @@ test "Conversion between vectors, arrays, and slices" { | ... | @@ -2582,7 +2582,7 @@ test "Conversion between vectors, arrays, and slices" { |
| 2582 | <li>Supports slice syntax: {#syntax#}ptr[start..end]{#endsyntax#}</li> | 2582 | <li>Supports slice syntax: {#syntax#}ptr[start..end]{#endsyntax#}</li> |
| 2583 | <li>Supports pointer arithmetic: {#syntax#}ptr + x{#endsyntax#}, {#syntax#}ptr - x{#endsyntax#}</li> | 2583 | <li>Supports pointer arithmetic: {#syntax#}ptr + x{#endsyntax#}, {#syntax#}ptr - x{#endsyntax#}</li> |
| 2584 | <li>{#syntax#}T{#endsyntax#} must have a known size, which means that it cannot be | 2584 | <li>{#syntax#}T{#endsyntax#} must have a known size, which means that it cannot be |
| 2585 | {#syntax#}c_void{#endsyntax#} or any other {#link|opaque type|opaque#}.</li> | 2585 | {#syntax#}anyopaque{#endsyntax#} or any other {#link|opaque type|opaque#}.</li> |
| 2586 | </ul> | 2586 | </ul> |
| 2587 | </li> | 2587 | </li> |
| 2588 | </ul> | 2588 | </ul> |
| ... | @@ -6269,8 +6269,8 @@ test "turn HashMap into a set with void" { | ... | @@ -6269,8 +6269,8 @@ test "turn HashMap into a set with void" { |
| 6269 | value is deleted, as seen above. | 6269 | value is deleted, as seen above. |
| 6270 | </p> | 6270 | </p> |
| 6271 | <p> | 6271 | <p> |
| 6272 | {#syntax#}void{#endsyntax#} is distinct from {#syntax#}c_void{#endsyntax#}. | 6272 | {#syntax#}void{#endsyntax#} is distinct from {#syntax#}anyopaque{#endsyntax#}. |
| 6273 | {#syntax#}void{#endsyntax#} has a known size of 0 bytes, and {#syntax#}c_void{#endsyntax#} has an unknown, but non-zero, size. | 6273 | {#syntax#}void{#endsyntax#} has a known size of 0 bytes, and {#syntax#}anyopaque{#endsyntax#} has an unknown, but non-zero, size. |
| 6274 | </p> | 6274 | </p> |
| 6275 | <p> | 6275 | <p> |
| 6276 | Expressions of type {#syntax#}void{#endsyntax#} are the only ones whose value can be ignored. For example: | 6276 | Expressions of type {#syntax#}void{#endsyntax#} are the only ones whose value can be ignored. For example: |
| ... | @@ -10618,8 +10618,10 @@ lib.addCSourceFile("src/lib.c", &[_][]const u8{ | ... | @@ -10618,8 +10618,10 @@ lib.addCSourceFile("src/lib.c", &[_][]const u8{ |
| 10618 | <li>{#syntax#}c_longlong{#endsyntax#}</li> | 10618 | <li>{#syntax#}c_longlong{#endsyntax#}</li> |
| 10619 | <li>{#syntax#}c_ulonglong{#endsyntax#}</li> | 10619 | <li>{#syntax#}c_ulonglong{#endsyntax#}</li> |
| 10620 | <li>{#syntax#}c_longdouble{#endsyntax#}</li> | 10620 | <li>{#syntax#}c_longdouble{#endsyntax#}</li> |
| 10621 | <li>{#syntax#}c_void{#endsyntax#}</li> | | |
| 10622 | </ul> | 10621 | </ul> |
| | 10622 | <p> |
| | 10623 | To interop with the C {#syntax#}void{#endsyntax#} type, use {#syntax#}anyopaque{#endsyntax#}. |
| | 10624 | </p> |
| 10623 | {#see_also|Primitive Types#} | 10625 | {#see_also|Primitive Types#} |
| 10624 | {#header_close#} | 10626 | {#header_close#} |
| 10625 | {#header_open|Import from C Header File#} | 10627 | {#header_open|Import from C Header File#} |