Re: [go-nuts] Re: Question about safe unsafe.Pointer conversion rules

2020-06-19 Thread Iskander Sharipov
Many thanks Ian! On Friday, June 19, 2020 at 11:32:19 PM UTC+3, Ian Lance Taylor wrote: > > On Fri, Jun 19, 2020 at 12:29 PM Iskander Sharipov > wrote: > > > > I used this to write something like a runtime in Go. > > > > https://play.golang.org/p/6jYw5L3fy0B > > > > I was wondering whether

Re: [go-nuts] Re: Question about safe unsafe.Pointer conversion rules

2020-06-19 Thread Ian Lance Taylor
On Fri, Jun 19, 2020 at 12:29 PM Iskander Sharipov wrote: > > I used this to write something like a runtime in Go. > > https://play.golang.org/p/6jYw5L3fy0B > > I was wondering whether this code can break at some point. I don't see any way that that code could break, but I agree that it does not

[go-nuts] Re: Question about safe unsafe.Pointer conversion rules

2020-06-19 Thread Iskander Sharipov
I used this to write something like a runtime in Go. https://play.golang.org/p/6jYw5L3fy0B I was wondering whether this code can break at some point. On Friday, June 19, 2020 at 10:04:01 PM UTC+3, Iskander Sharipov wrote: > > Hello! > > https://golang.org/src/runtime/symtab.go?s=7594:7745#L244

[go-nuts] Re: Question about safe unsafe.Pointer conversion rules

2020-06-19 Thread Iskander Sharipov
s/same/safe/ The question is about whether it's safe to do the same conversion outside of the Go runtime. On Friday, June 19, 2020 at 10:04:01 PM UTC+3, Iskander Sharipov wrote: > > Hello! > > https://golang.org/src/runtime/symtab.go?s=7594:7745#L244 > > type Func struct { > > opaque