Commit ecbcd816 authored by Russ Cox's avatar Russ Cox

unsafe: add missing case to doc for Pointer

Fixes #1433.

R=r, gri
CC=golang-dev
https://golang.org/cl/3999047
parent 50fe459c
...@@ -14,8 +14,9 @@ type ArbitraryType int ...@@ -14,8 +14,9 @@ type ArbitraryType int
// Pointer represents a pointer to an arbitrary type. There are three special operations // Pointer represents a pointer to an arbitrary type. There are three special operations
// available for type Pointer that are not available for other types. // available for type Pointer that are not available for other types.
// 1) A pointer value of any type can be converted to a Pointer. // 1) A pointer value of any type can be converted to a Pointer.
// 2) A uintptr can be converted to a Pointer. // 2) A Pointer can be converted to a pointer value of any type.
// 3) A Pointer can be converted to a uintptr. // 3) A uintptr can be converted to a Pointer.
// 4) A Pointer can be converted to a uintptr.
// Pointer therefore allows a program to defeat the type system and read and write // Pointer therefore allows a program to defeat the type system and read and write
// arbitrary memory. It should be used with extreme care. // arbitrary memory. It should be used with extreme care.
type Pointer *ArbitraryType type Pointer *ArbitraryType
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment