zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 14c68e847aeb00233c3a2660ec81deaae70d51da (tree)
parent b643c5dc917e0f1c52e893bc0046aaddb7ca6fee
Author: Arnau <61841960+Arnau478@users.noreply.github.com>
Date:   Tue,  2 May 2023 13:15:29 +0200

langref: Documented `extern "..."` use

The use of `extern "..."` for specifying the library that has the definition was undocumented.
Fixes #13906
Diffstat:
Mdoc/langref.html.in | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/doc/langref.html.in b/doc/langref.html.in @@ -5184,7 +5184,8 @@ export fn sub(a: i8, b: i8) i8 { return a - b; } // The extern specifier is used to declare a function that will be resolved // at link time, when linking statically, or at runtime, when linking -// dynamically. +// dynamically. The quoted identifier after the extern keyword specifies +// the library that has the function. (e.g. "c" -> libc.so) // The callconv specifier changes the calling convention of the function. const WINAPI: std.builtin.CallingConvention = if (native_arch == .x86) .Stdcall else .C; extern "kernel32" fn ExitProcess(exit_code: u32) callconv(WINAPI) noreturn;