cgen,cheaders: move _vinit_caller()/_vcleanup_caller() fn declare forword#23507
Merged
Conversation
|
Connected to Huly®: V_0.6-21936 |
Contributor
|
(the CI failure is unrelated and already fixed on master) |
spytheman
reviewed
Jan 18, 2025
Comment on lines
+539
to
+544
| #ifdef _WIN32 | ||
| // workaround for windows, export _vinit_caller/_vcleanup_caller, let dl.open()/dl.close() call it | ||
| // NOTE: This is hardcoded in vlib/dl/dl_windows.c.v! | ||
| VV_EXPORTED_SYMBOL void _vinit_caller(); | ||
| VV_EXPORTED_SYMBOL void _vcleanup_caller(); | ||
| #endif |
Contributor
There was a problem hiding this comment.
I fail to see, what the benefit of this is, compared to the previous approach, of only generating those lines conditionally.
Contributor
Author
There was a problem hiding this comment.
This will make user's v function can call the _vinit_caller/_vcleanup_caller, or the compiler will issue error message "implicit declaration of function"
Contributor
|
(the CI errors are not related) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix issue #23496
This PR will make V's dll can be called by other program.
But the v function should call
_vinit_caller()/_vcleanup_caller()directly....example: