Add (Gen > C) -> Added __fastcall attribute

This pr add the __fastcall attribute, I'm not very sure about the same if it should have two "_" or only one in the attribute name.
it may not be useful for a lot of people but it can be useful for some cases with c++ to pass the this argument since there is no __thiscall in c.
Thanks for reading :)
pull/14016/head
fleur 2022-04-12 10:30:39 +02:00 committed by GitHub
parent 716cb17aea
commit e0c9bf7613
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -2150,6 +2150,9 @@ fn (mut g Gen) write_fn_attrs(attrs []ast.Attr) string {
// prefixed by windows to indicate they're for advanced users only and not really supported by V.
fn_attrs += '__stdcall '
}
'_fastcall' {
fn_attrs += '__fastcall '
}
'console' {
g.force_main_console = true
}