authorgravatar for 61841960+Arnau478@users.noreply.github.comArnau <61841960+Arnau478@users.noreply.github.com> 2023-05-02 13:15:29+02:00
committergravatar for git@vexu.euVeikka Tuominen <git@vexu.eu> 2023-05-03 08:35:30+03:00
log14c68e847aeb00233c3a2660ec81deaae70d51da
treecff64f55cf0b6a2ff5243337d1220b0520d96b50
parentb643c5dc917e0f1c52e893bc0046aaddb7ca6fee

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

The use of `extern "..."` for specifying the library that has the definition was undocumented. Fixes #13906

1 files changed, 2 insertions(+), 1 deletions(-)

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