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

Windows prototype line is not in title case #4005

Closed
gopherbot opened this issue Aug 25, 2012 · 4 comments
Closed

Windows prototype line is not in title case #4005

gopherbot opened this issue Aug 25, 2012 · 4 comments

Comments

@gopherbot
Copy link
Contributor

by raul.san@sent.com:

The prototype on the next file [1] to create system calls in Windows, should have a
windows API name in tittle case.

It has now: kernel32.getCurrentProcessId
but it should be kernel32.GetCurrentProcessId [2]

since all Windows calls are in tittle case. (In fact, that is the only prototype line
without be tittle case).


[1]: http://golang.org/src/pkg/syscall/syscall_windows.go#L204
[2]: http://winapi.freetechsecrets.com/win32/WIN32GetCurrentProcessId.htm
@gopherbot
Copy link
Contributor Author

Comment 1 by raul.san@sent.com:

It's true that not all Windows API calls are in tittle case like, i,e, setsockopt[1],
but GetCurrentProcessId is in tittle case.
[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/ms740476%28v=vs.85%29.aspx

@alexbrainman
Copy link
Member

Comment 2:

We do not want to export this function.

Status changed to WorkingAsIntended.

@gopherbot
Copy link
Contributor Author

Comment 3 by raul.san@sent.com:

Ok. The line syscall is:
//sys   getCurrentProcessId() (pid uint32) = kernel32.getCurrentProcessId
Then, in mksyscall_windows.pl says:
If go func name needs to be different from it's winapi dll name,
the winapi name could be specified at the end, after "=" sign, like
  //sys LoadLibrary(libname string) (handle uint32, err error) = LoadLibraryA
http://golang.org/src/pkg/syscall/mksyscall_windows.pl
So we would get:
//sys   getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId
being getCurrentProcessId() the Go function name and remaining private.

@gopherbot
Copy link
Contributor Author

Comment 4 by raul.san@sent.com:

minux: "the name is changed to avoid introducing new API in Go 1.0.x point releases."

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants