Skip to content

Incomplete documentation for unsafe.Pointer #1433

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

Closed
gopherbot opened this issue Jan 20, 2011 · 2 comments
Closed

Incomplete documentation for unsafe.Pointer #1433

gopherbot opened this issue Jan 20, 2011 · 2 comments

Comments

@gopherbot
Copy link
Contributor

by spoon.reloaded:

The documentation for unsafe.Pointer from the Packages pages
(http://golang.org/pkg/unsafe/#Pointer) says that the following special operations can
be done on it:
1) A pointer value of any type can be converted to a Pointer.
2) A uintptr can be converted to a Pointer.
3) A Pointer can be converted to a uintptr.

However, the Go language specification
(http://golang.org/doc/go_spec.html#Package_unsafe) says that:
Any pointer or value of type uintptr can be converted into a Pointer and vice versa.

So the documentation above is missing the case:
4) A Pointer can be converted to a pointer value of any type
@rsc
Copy link
Contributor

rsc commented Jan 20, 2011

Comment 1:

http://golang.org/cl/3999047

Owner changed to [email protected].

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Jan 20, 2011

Comment 2:

This issue was closed by revision ecbcd81.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
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