On Tue, 11 Oct 2016 07:55:21 -0700 (PDT)
T L <tapir....@gmail.com> wrote:

[...]
> > (*int)(atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&t.a))))
> Wow, cool!
> So values of type unsafe.Pointer can be converted to values of type 
> *unsafe.Pointer?
> But I can't find the official docs mentioning this. Is it safe?

When you're using package "unsafe", all bets are already off ;-)

But OK, I'd say the type unsafe.Pointer represents values which are
integers large enough to store pointer values of the target platform.
Since *unsafe.Pointer is a pointer, I see no problem with
type-converting it to unsafe.Pointer as both values definitely share
the underlying representation.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to