unsafe pointer to ctx

pull/4/head
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
1 changed files with 1 additions and 1 deletions

View File

@ -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]