From 5361b747b732cf6cf183591b7a66b83fb6fab29f Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Thu, 23 Oct 2014 09:45:11 -0700 Subject: [PATCH] spec: minimal documention of unsafe.Pointer conversions Per suggestion from rsc as a result of the dicussion of (abandoned) CL 153110044. Fixes #7192. LGTM=r, rsc, iant R=r, rsc, iant, ken CC=golang-codereviews https://golang.org/cl/163050043 --- doc/go_spec.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 97effeaa4ab9eb..ad645c1ffcb81e 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,6 +1,6 @@ @@ -6207,8 +6207,8 @@

Package unsafe

The built-in package unsafe, known to the compiler, provides facilities for low-level programming including operations that violate the type system. A package using unsafe -must be vetted manually for type safety. The package provides the -following interface: +must be vetted manually for type safety and may not be portable. +The package provides the following interface:

@@ -6223,10 +6223,11 @@ 

Package unsafe

-Any pointer or value of underlying type uintptr can be converted to -a Pointer type and vice versa. A Pointer is a pointer type but a Pointer value may not be dereferenced. +Any pointer or value of underlying type uintptr can be converted to +a Pointer type and vice versa. +The effect of converting between Pointer and uintptr is implementation-defined.