Add (Docs) -> Added doc for newly added callconv attribute
parent
77efa1f074
commit
5be88d97ae
|
|
@ -5978,10 +5978,15 @@ fn custom_allocations() {
|
|||
struct C.Foo {
|
||||
}
|
||||
|
||||
// Used in Win32 API code when you need to pass callback function
|
||||
[windows_stdcall]
|
||||
// Used to add a custom calling convention to a function, available calling convention: stdcall, fastcall and cdecl.
|
||||
// This list aslo apply for type aliases (see below).
|
||||
[callconv: "stdcall"]
|
||||
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:
|
||||
// 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.
|
||||
|
|
|
|||
Loading…
Reference in New Issue