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 unsafe.SliceData() #1178

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

Conversation

jdemeyer
Copy link
Contributor

Since we require Go 1.21 now, we can use unsafe.SliceData which simplifies quite a bit of code involving passing slices to C. I focused on the most important places in the code where such a conversion was done. If this PR is approved, I can do the other places also.

While I was at it, I also replaced UnixNano()/1000000 by UnixMilli() in code I was editing anyway.

@milindl
Copy link
Contributor

milindl commented Apr 18, 2024

Great stuff, thanks for this PR. I only skimmed the PR yet, but I do believe it makes sense.

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.

None yet

2 participants