Skip to content

cgen: allow for @[c_extern] fn C.somename(param1 int, param2 &char) &char#22502

Merged
spytheman merged 2 commits intovlang:masterfrom
spytheman:allow_for_c_extern_tags_for_fn_C_declarations
Oct 12, 2024
Merged

cgen: allow for @[c_extern] fn C.somename(param1 int, param2 &char) &char#22502
spytheman merged 2 commits intovlang:masterfrom
spytheman:allow_for_c_extern_tags_for_fn_C_declarations

Conversation

@spytheman
Copy link
Copy Markdown
Contributor

  • cgen: allow for @[c_extern] fn C.somename(param1 int, param2 &char) &char
  • add a test .vv/.c.must_have pair

@spytheman spytheman changed the title allow for c extern tags for fn C declarations cgen: allow for @[c_extern] fn C.somename(param1 int, param2 &char) &char Oct 12, 2024
@spytheman spytheman merged commit 4fcd94a into vlang:master Oct 12, 2024
@spytheman spytheman deleted the allow_for_c_extern_tags_for_fn_C_declarations branch October 12, 2024 12:48
@medvednikov
Copy link
Copy Markdown
Member

Can you document the new attribute please?

@spytheman
Copy link
Copy Markdown
Contributor Author

It is not a new attribute, it is already documented for usage with C globals.

I would like to avoid documenting its usage with C functions for now, until it is used a bit more in the field by people with actual projects, that need it (see the messages by @raojm in #compiler-and-vlib-dev on Discord), and bugs related to it fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants