mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add calling convention "system" which is an alias for "stdcall" on Windows and "cdecl" on other platforms
This commit is contained in:
@@ -3273,6 +3273,12 @@ ProcCallingConvention string_to_calling_convention(String s) {
|
|||||||
if (s == "fast") return ProcCC_FastCall;
|
if (s == "fast") return ProcCC_FastCall;
|
||||||
if (s == "none") return ProcCC_None;
|
if (s == "none") return ProcCC_None;
|
||||||
if (s == "naked") return ProcCC_Naked;
|
if (s == "naked") return ProcCC_Naked;
|
||||||
|
if (s == "system") {
|
||||||
|
if (build_context.metrics.os == TargetOs_windows) {
|
||||||
|
return ProcCC_StdCall;
|
||||||
|
}
|
||||||
|
return ProcCC_CDecl;
|
||||||
|
}
|
||||||
return ProcCC_Invalid;
|
return ProcCC_Invalid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user