Skip to content

Commit d8d11e2

Browse files
committed
add 'system' to variadic ABIs
1 parent e122eef commit d8d11e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/items/external-blocks.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ r[items.extern.abi.c]
124124
* `unsafe extern "C"` --- The "C" ABI matches the default ABI chosen by the dominant C compiler for the target.
125125
126126
r[items.extern.abi.system]
127-
* `unsafe extern "system"` --- This is equivalent to `extern "C"` except on Windows x86_32 where it is equivalent to `"stdcall"`.
127+
* `unsafe extern "system"` --- This is equivalent to `extern "C"` except on Windows x86_32 where it is equivalent to `"stdcall"` for non-variadic functions, and equivalent to `"C"` for variadic functions.
128128
129129
> [!NOTE]
130130
> As the correct underlying ABI on Windows is target-specific, it's best to use `extern "system"` when attempting to link Windows API functions that don't use an explicitly defined ABI.
@@ -257,6 +257,7 @@ Variadic parameters can only be specified within `extern` blocks with the follow
257257
- `"C"`
258258
- `"cdecl"`
259259
- `"efiapi"`
260+
- `"system"`
260261
- `"sysv64"`
261262
- `"win64"`
262263

0 commit comments

Comments
 (0)