unsafe pointer to ctx
parent
bad8bc54a0
commit
0419d84ca6
|
@ -41,7 +41,7 @@ func getCtxData(b *Bridge) (unsafe.Pointer, error) {
|
||||||
|
|
||||||
func getBridge(ctx unsafe.Pointer) *Bridge {
|
func getBridge(ctx unsafe.Pointer) *Bridge {
|
||||||
ictx := wasmer.IntoInstanceContext(ctx)
|
ictx := wasmer.IntoInstanceContext(ctx)
|
||||||
c := (*bctx)(ictx.Data())
|
c := (*bctx)((ictx.Data()).(unsafe.Pointer))
|
||||||
mu.RLock()
|
mu.RLock()
|
||||||
defer mu.RUnlock()
|
defer mu.RUnlock()
|
||||||
return bridges[c.n]
|
return bridges[c.n]
|
||||||
|
|
Loading…
Reference in New Issue