diff options
author | Chip Salzenberg <chip@pobox.com> | 1999-03-09 06:51:57 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-11 02:49:07 +0000 |
commit | d2a96e185e1b71ff357f345320f6b779ef405c61 (patch) | |
tree | d17fe60b1f9973745e8a7a4dc5180e630f87d561 /scope.c | |
parent | 1c9a023abcf67153a0d9591b148b7172d33af0de (diff) | |
download | perl-d2a96e185e1b71ff357f345320f6b779ef405c61.tar.gz |
gutsupport for C++ exceptions
Message-ID: <19990309115157.E7911@perlsupport.com>
Subject: [PATCH 5.005] Flexible Exceptions
p4raw-id: //depot/perl@3386
Diffstat (limited to 'scope.c')
-rw-r--r-- | scope.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -15,6 +15,30 @@ #include "EXTERN.h" #include "perl.h" +void * +default_protect(int *except, protect_body_t body, ...) +{ + dTHR; + dJMPENV; + va_list args; + int ex; + void *ret; + + DEBUG_l(deb("Setting up local jumplevel %p, was %p\n", + &cur_env, PL_top_env)); + JMPENV_PUSH(ex); + if (ex) + ret = NULL; + else { + va_start(args, body); + ret = body(args); + va_end(args); + } + *except = ex; + JMPENV_POP; + return ret; +} + SV** stack_grow(SV **sp, SV **p, int n) { |