mirror of
https://github.com/janet-lang/janet
synced 2025-10-21 18:57:41 +00:00
Use _setjmp/_longjmp on BSDs.
This doesn't save the signal mask so should be a bit faster.
This commit is contained in:
@@ -29,7 +29,11 @@
|
||||
void janet_panicv(Janet message) {
|
||||
if (janet_vm_return_reg != NULL) {
|
||||
*janet_vm_return_reg = message;
|
||||
#if defined(JANET_BSD) || defined(JANET_APPLE)
|
||||
_longjmp(*janet_vm_jmp_buf, 1);
|
||||
#else
|
||||
longjmp(*janet_vm_jmp_buf, 1);
|
||||
#endif
|
||||
} else {
|
||||
fputs((const char *)janet_formatc("janet top level panic - %v\n", message), stdout);
|
||||
exit(1);
|
||||
|
Reference in New Issue
Block a user