On Monday 09 December 2019 15:55:18 Ian Lance Taylor wrote:
> On Mon, Dec 9, 2019 at 10:30 AM <p...@cpan.org> wrote:
> >
> > So should I interpret your answer as long jumps are not supported and
> > caller of C function from Go must ensure that called C function would
> > not call longjmp()?
> 
> Correct: Go code should not call C code that calls longjmp.  (Well,
> it's OK to call C code that calls setjmp and then calls longjmp back
> to that setjmp; what's not OK is using longjmp to jump across or out
> of the Go code.)

One small suggestion: Could you put this information into cgo
documentation? I think that this should be documented.

> > And another interesting question, it is possible to call longjmp() from
> > Go code? To throw C exception back to the main C application.
> 
> No.

Thank you for answers!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/20191210102011.luq3v5qzt65yyafv%40pali.

Reply via email to