Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
go / opt / go / src / runtime / testdata / testprogcgo / panic.go
Size: Mime:
package main

// This program will crash.
// We want to test unwinding from a cgo callback.

/*
void call_callback(void);
*/
import "C"

func init() {
	register("PanicCallback", PanicCallback)
}

//export panic_callback
func panic_callback() {
	var i *int
	*i = 42
}

func PanicCallback() {
	C.call_callback()
}