Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

spytheman
Copy link
Member

  • 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
78 checks passed
@spytheman spytheman deleted the allow_for_c_extern_tags_for_fn_C_declarations branch October 12, 2024 12:48
@medvednikov
Copy link
Member

Can you document the new attribute please?

@spytheman
Copy link
Member 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