Skip to content

Commit

Permalink
fix throw
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Dec 5, 2024
1 parent cd200c0 commit 6de9c52
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ func caller(skip int) (file *byte, line int32) {
return (*byte)(noescape(unsafe.Pointer(unsafe.StringData(f)))), int32(l)
}

//go:linkname runtime_throw runtime.throw
func runtime_throw(string)
//go:linkname throw runtime.throw
func throw(string)

// cryptoMalloc allocates n bytes of memory on the OpenSSL heap, which may be
// different from the heap which C.malloc allocates on. The allocated object
Expand All @@ -338,7 +338,7 @@ func cryptoMalloc(n int) unsafe.Pointer {
if p == nil {
// Un-recover()-ably crash the program in the same manner as the
// C.malloc() wrapper function.
runtime_throw("openssl: CRYPTO_malloc failed")
throw("openssl: CRYPTO_malloc failed")
}
return p
}
Expand Down

0 comments on commit 6de9c52

Please sign in to comment.