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

chore: replace deprecated Syscall* with SyscallN #257

Closed
wants to merge 1 commit into from

Conversation

mauri870
Copy link
Member

@mauri870 mauri870 commented Dec 2, 2024

What does this PR do?

Replace deprecated syscall.Syscall* functions with syscall.SyscallN, a variadic version that can handle any number of arguments.

Why is it important?

Removes a deprecated function, has no side effects since the numbered variants are based on SyscallN.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works

@mauri870 mauri870 self-assigned this Dec 2, 2024
@mauri870 mauri870 marked this pull request as ready for review December 2, 2024 15:55
@mauri870 mauri870 requested a review from a team as a code owner December 2, 2024 15:55
@mauri870 mauri870 requested review from AndersonQ, belimawr and VihasMakwana and removed request for a team December 2, 2024 15:55
@mauri870
Copy link
Member Author

mauri870 commented Dec 2, 2024

@VihasMakwana Added you as a reviewer because of your work with windows syscalls.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 2, 2024

💔 Build Failed

Failed CI Steps

History

cc @mauri870

@leehinman
Copy link
Contributor

This is a generated file. Can we fix the generator?

@mauri870
Copy link
Member Author

mauri870 commented Dec 2, 2024

This is a generated file. Can we fix the generator?

Oh, I didn't notice this was autogenerated, thanks. I'll look into it.

@mauri870 mauri870 marked this pull request as draft December 2, 2024 16:11
@mauri870
Copy link
Member Author

mauri870 commented Dec 2, 2024

Aha, I knew I had seen this before. It turns out I modified mkwinsyscall in Go some time ago to use SyscallN only if the number of arguments exceeds 16. I believe it was decided this way to avoid unnecessary changes on users of this script for code generation.

https://go-review.googlesource.com/c/sys/+/518995

Closing this as not needed. Thanks.

@mauri870 mauri870 closed this Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants