langref: Add c_char to the list of primitive types

This commit is contained in:
Evan Haas 2023-06-28 11:58:45 -07:00 committed by Andrew Kelley
parent 82520a214c
commit 77dcd903a0

View File

@ -736,6 +736,11 @@ pub fn main() void {
<td>unsigned pointer sized integer. Also see <a href="https://github.com/ziglang/zig/issues/5185">#5185</a></td> <td>unsigned pointer sized integer. Also see <a href="https://github.com/ziglang/zig/issues/5185">#5185</a></td>
</tr> </tr>
<tr>
<th scope="row">{#syntax#}c_char{#endsyntax#}</th>
<td><code class="c">char</code></td>
<td>for ABI compatibility with C</td>
</tr>
<tr> <tr>
<th scope="row">{#syntax#}c_short{#endsyntax#}</th> <th scope="row">{#syntax#}c_short{#endsyntax#}</th>
<td><code class="c">short</code></td> <td><code class="c">short</code></td>
@ -10813,6 +10818,7 @@ lib.addCSourceFile("src/lib.c", &[_][]const u8{
These have guaranteed C ABI compatibility and can be used like any other type. These have guaranteed C ABI compatibility and can be used like any other type.
</p> </p>
<ul> <ul>
<li>{#syntax#}c_char{#endsyntax#}</li>
<li>{#syntax#}c_short{#endsyntax#}</li> <li>{#syntax#}c_short{#endsyntax#}</li>
<li>{#syntax#}c_ushort{#endsyntax#}</li> <li>{#syntax#}c_ushort{#endsyntax#}</li>
<li>{#syntax#}c_int{#endsyntax#}</li> <li>{#syntax#}c_int{#endsyntax#}</li>