mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-22 19:40:36 +00:00
8a134014b4
Generated by go1.17 fmt ./...
25 lines
665 B
Go
25 lines
665 B
Go
// Copyright 2015 Jeffrey Wilcke, Felix Lange, Gustav Simonsson. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be found in
|
|
// the LICENSE file.
|
|
|
|
//go:build !gofuzz && cgo
|
|
// +build !gofuzz,cgo
|
|
|
|
package secp256k1
|
|
|
|
import "C"
|
|
import "unsafe"
|
|
|
|
// Callbacks for converting libsecp256k1 internal faults into
|
|
// recoverable Go panics.
|
|
|
|
//export secp256k1GoPanicIllegal
|
|
func secp256k1GoPanicIllegal(msg *C.char, data unsafe.Pointer) {
|
|
panic("illegal argument: " + C.GoString(msg))
|
|
}
|
|
|
|
//export secp256k1GoPanicError
|
|
func secp256k1GoPanicError(msg *C.char, data unsafe.Pointer) {
|
|
panic("internal error: " + C.GoString(msg))
|
|
}
|