We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
v
@[export: 'strdemo'] pub fn strdemo(strs string) string { return strs }
c
const char* strdemo(const char* str);
Nothing. Nothing in the string
Return with result
Export to shared library
No response
0.5.6
windows
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote. Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered:
A V string is a struct, not a char *. Try changing the code to
@[export: 'strdemo'] pub fn strdemo(strs string) string { return strs.data }
to return the actual char array from V.
Be very careful not to modify that data in the C code, or you will hose the V string.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
v
c
Nothing. Nothing in the string
Reproduction Steps
v
Expected Behavior
Return with result
Current Behavior
Export to shared library
Possible Solution
No response
Additional Information/Context
No response
V version
0.5.6
Environment details (OS name and version, etc.)
windows
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: