github.com/gotranspile/cxgo@v0.3.7/runtime/libc/setjmp.go (about) 1 package libc 2 3 type JumpBuf struct { 4 val int // for non-zero size 5 } 6 7 func (b *JumpBuf) SetJump() int { 8 // returns 0 on the first call (correct behavior) 9 return b.val 10 } 11 12 func (b *JumpBuf) LongJump(val int) { 13 b.val = val 14 panic("longjmp") 15 }