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

Use cgo noescape/nocallback instead of C wrappers #249

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Use cgo noescape/nocallback instead of C wrappers #249

merged 3 commits into from
Feb 21, 2025

Conversation

qmuntal
Copy link
Collaborator

@qmuntal qmuntal commented Feb 18, 2025

noescape and nocallback are new go1.24 cgo directives that helps the Go compiler take better decisions. See golang/go#56378 for more context. We can use these directives instead of custom C wrappers, which makes our codebase a bit simpler.

This PR only tackles one-line wrappers. The more complex wrapper will be reviewed in a follow-up PR.

This is another attempt at #113.

While here, add Go 1.24 to our CI test matrix and skip TestAllocations is asan is enabled, which makes the test to fail.

@qmuntal qmuntal merged commit 05515e5 into v2 Feb 21, 2025
50 checks passed
@qmuntal qmuntal deleted the usecgodir branch February 21, 2025 09:59
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.

3 participants