From: Gurusamy Sarathy Date: Sat, 4 Apr 1998 23:11:52 +0000 (+0000) Subject: [win32] set up PUSHSTACK for __DIE__ and __WARN__ hooks also X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8931a351763bab7adf45abbc170bb711ffddf83b;p=p5sagit%2Fp5-mst-13.2.git [win32] set up PUSHSTACK for __DIE__ and __WARN__ hooks also p4raw-id: //depot/win32/perl@881 --- diff --git a/cop.h b/cop.h index 4b2e04f..5eebaba 100644 --- a/cop.h +++ b/cop.h @@ -297,10 +297,8 @@ struct context { #define SI_SIGNAL 4 #define SI_OVERLOAD 5 #define SI_DESTROY 6 -/* XXX todo #define SI_WARNHOOK 7 #define SI_DIEHOOK 8 -*/ struct stackinfo { AV * si_stack; /* stack for current runlevel */ diff --git a/util.c b/util.c index c996081..ac51f13 100644 --- a/util.c +++ b/util.c @@ -1304,11 +1304,12 @@ die(pat, va_alist) SvREADONLY_on(msg); SAVEFREESV(msg); + PUSHSTACK(SI_DIEHOOK); PUSHMARK(SP); XPUSHs(msg); PUTBACK; perl_call_sv((SV*)cv, G_DISCARD); - + POPSTACK(); LEAVE; } } @@ -1369,11 +1370,12 @@ croak(pat, va_alist) SvREADONLY_on(msg); SAVEFREESV(msg); + PUSHSTACK(SI_DIEHOOK); PUSHMARK(SP); XPUSHs(msg); PUTBACK; perl_call_sv((SV*)cv, G_DISCARD); - + POPSTACK(); LEAVE; } } @@ -1428,11 +1430,12 @@ warn(pat,va_alist) SvREADONLY_on(msg); SAVEFREESV(msg); + PUSHSTACK(SI_WARNHOOK); PUSHMARK(SP); XPUSHs(msg); PUTBACK; perl_call_sv((SV*)cv, G_DISCARD); - + POPSTACK(); LEAVE; return; }