unsafe pointer to ctx

This commit is contained in:
vedhavyas 2020-01-04 12:53:24 +01:00
parent bad8bc54a0
commit 0419d84ca6
No known key found for this signature in database
GPG Key ID: 317BF0923E3EB7E5

View File

@ -41,7 +41,7 @@ func getCtxData(b *Bridge) (unsafe.Pointer, error) {
func getBridge(ctx unsafe.Pointer) *Bridge {
ictx := wasmer.IntoInstanceContext(ctx)
c := (*bctx)(ictx.Data())
c := (*bctx)((ictx.Data()).(unsafe.Pointer))
mu.RLock()
defer mu.RUnlock()
return bridges[c.n]