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

const in callbacks #153

Merged
merged 1 commit into from
Jan 31, 2025
Merged

const in callbacks #153

merged 1 commit into from
Jan 31, 2025

Conversation

arnetheduck
Copy link
Contributor

Since callback signatures are now generated in C++, might as well go ahead and retain const and the pointer type, removing a const_cast in the process.

Since callback signatures are now generated in C++, might as well go
ahead and retain `const` and the pointer type, removing a `const_cast`
in the process.
@mappu
Copy link
Owner

mappu commented Jan 31, 2025

Thank you - the void* was a holdover from when the dynamic_cast stuff was a bit more dodgy. It's great to have the real type parameter present there.

I was worried about the const comment about CGO compatibility, but i tried some small examples and everything works fine in my testing.

🚢

@mappu mappu merged commit 1ab7b48 into mappu:master Jan 31, 2025
8 checks passed
@mappu
Copy link
Owner

mappu commented Feb 1, 2025

It looks like this only changed the cpp, not the header, so the function prototype differs from the implementation. That's probably why there were no issues with the Go side.

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