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,cheaders: move _vinit_caller()/_vcleanup_caller() fn declare forword #23507

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kbkpbot
Copy link
Contributor

@kbkpbot kbkpbot commented Jan 18, 2025

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:

fn C._vinit_caller()
fn C._vcleanup_caller()

@[export: 'func']
fn func() {
	C._vinit_caller()          // must call first
	println('Begin DLL')
	for i in 0 .. 10 {
		println('${i}')
	}
	println('End DLL')
	C._vcleanup_caller()    // must call last,  note, currently , it is an empty function....
}

Copy link

Connected to Huly®: V_0.6-21936

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.

1 participant