Add (Docs) -> Added doc for newly added callconv attribute
parent
77efa1f074
commit
5be88d97ae
|
|
@ -5978,10 +5978,15 @@ fn custom_allocations() {
|
||||||
struct C.Foo {
|
struct C.Foo {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used in Win32 API code when you need to pass callback function
|
// Used to add a custom calling convention to a function, available calling convention: stdcall, fastcall and cdecl.
|
||||||
[windows_stdcall]
|
// This list aslo apply for type aliases (see below).
|
||||||
|
[callconv: "stdcall"]
|
||||||
fn C.DefWindowProc(hwnd int, msg int, lparam int, wparam int)
|
fn C.DefWindowProc(hwnd int, msg int, lparam int, wparam int)
|
||||||
|
|
||||||
|
// Used to add a custom calling convention to a function type aliases.
|
||||||
|
[callconv: "fastcall"]
|
||||||
|
type FastFn = fn (int) bool
|
||||||
|
|
||||||
// Windows only:
|
// Windows only:
|
||||||
// If a default graphics library is imported (ex. gg, ui), then the graphical window takes
|
// If a default graphics library is imported (ex. gg, ui), then the graphical window takes
|
||||||
// priority and no console window is created, effectively disabling println() statements.
|
// priority and no console window is created, effectively disabling println() statements.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue