From: Marcus Holland-Moritz Date: Wed, 2 Feb 2005 21:29:40 +0000 (+0000) Subject: Upgrade to Devel::PPPort 3.06. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2dd695763641c95e068d98b5293519953c68fc4e;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Devel::PPPort 3.06. p4raw-id: //depot/perl@23926 --- diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes index 9e728ee..8eb53f6 100755 --- a/ext/Devel/PPPort/Changes +++ b/ext/Devel/PPPort/Changes @@ -1,3 +1,8 @@ +3.06 - 2005-02-02 + + * fix cpan #11327: make fails with syntax error + * fix XCPT_* macros + 3.05 - 2005-01-31 * fix a test for SvPV_nolen diff --git a/ext/Devel/PPPort/META.yml b/ext/Devel/PPPort/META.yml index ec326e2..ba52479 100644 --- a/ext/Devel/PPPort/META.yml +++ b/ext/Devel/PPPort/META.yml @@ -1,7 +1,7 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Devel-PPPort -version: 3.05 +version: 3.06 version_from: PPPort_pm.PL installdirs: perl requires: diff --git a/ext/Devel/PPPort/PPPort.pm b/ext/Devel/PPPort/PPPort.pm index 907cbf5..da91556 100644 --- a/ext/Devel/PPPort/PPPort.pm +++ b/ext/Devel/PPPort/PPPort.pm @@ -884,7 +884,7 @@ require DynaLoader; use strict; use vars qw($VERSION @ISA $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.05 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.06 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; @ISA = qw(DynaLoader); @@ -5792,24 +5792,20 @@ DPPP_(my_grok_oct)(pTHX_ char *start, STRLEN *len_p, I32 *flags, NV *result) #endif #endif -#ifdef dJMPENV - -# ifndef dXCPT +#ifdef NO_XSLOCKS +# ifdef dJMPENV # define dXCPT dJMPENV; int rEtV = 0 # define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) # define XCPT_TRY_END JMPENV_POP; # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW JMPENV_JUMP(rEtV) +# else +# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 +# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) +# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); +# define XCPT_CATCH if (rEtV != 0) +# define XCPT_RETHROW Siglongjmp(top_env, rEtV) # endif - -#else - -# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 -# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) -# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); -# define XCPT_CATCH if (rEtV != 0) -# define XCPT_RETHROW Siglongjmp(top_env, rEtV) - #endif #endif /* _P_P_PORTABILITY_H_ */ diff --git a/ext/Devel/PPPort/PPPort.xs b/ext/Devel/PPPort/PPPort.xs index e0bfb31..731741b 100644 --- a/ext/Devel/PPPort/PPPort.xs +++ b/ext/Devel/PPPort/PPPort.xs @@ -69,32 +69,8 @@ /* ========== BEGIN XSMISC ================================================== */ /* ---- from parts/inc/exception ---- */ -static void throws_exception(int throw_e) -{ - if (throw_e) - croak("boo\n"); -} - -static int exception(int throw_e) -{ - dTHR; - dXCPT; - SV *caught = get_sv("Devel::PPPort::exception_caught", 0); - - XCPT_TRY_START { - throws_exception(throw_e); - } XCPT_TRY_END - - XCPT_CATCH - { - sv_setiv(caught, 1); - XCPT_RETHROW; - } - - sv_setiv(caught, 0); - - return 42; -} +/* defined in module3.c */ +int exception(int throw_e); /* ---- from parts/inc/misc ---- */ XS(XS_Devel__PPPort_dXSTARG); /* prototype */ diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL index 2f3a19d..e992230 100644 --- a/ext/Devel/PPPort/PPPort_pm.PL +++ b/ext/Devel/PPPort/PPPort_pm.PL @@ -473,7 +473,7 @@ require DynaLoader; use strict; use vars qw($VERSION @ISA $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.05 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.06 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; @ISA = qw(DynaLoader); diff --git a/ext/Devel/PPPort/module3.c b/ext/Devel/PPPort/module3.c index 4c230fa..7ce5b60 100644 --- a/ext/Devel/PPPort/module3.c +++ b/ext/Devel/PPPort/module3.c @@ -4,9 +4,9 @@ * ******************************************************************************** * -* $Revision: 5 $ +* $Revision: 6 $ * $Author: mhx $ -* $Date: 2005/01/31 08:10:50 +0100 $ +* $Date: 2005/02/02 21:47:34 +0100 $ * ******************************************************************************** * @@ -21,11 +21,41 @@ #include "EXTERN.h" #include "perl.h" + +#define NO_XSLOCKS #include "XSUB.h" #include "ppport.h" +static void throws_exception(int throw_e) +{ + if (throw_e) + croak("boo\n"); +} + +int exception(int throw_e) +{ + dTHR; + dXCPT; + SV *caught = get_sv("Devel::PPPort::exception_caught", 0); + + XCPT_TRY_START { + throws_exception(throw_e); + } XCPT_TRY_END + + XCPT_CATCH + { + sv_setiv(caught, 1); + XCPT_RETHROW; + } + + sv_setiv(caught, 0); + + return 42; +} + void call_newCONSTSUB_3(void) { newCONSTSUB(gv_stashpv("Devel::PPPort", FALSE), "test_value_3", newSViv(3)); } + diff --git a/ext/Devel/PPPort/parts/inc/exception b/ext/Devel/PPPort/parts/inc/exception index 2996958..cc1ba26 100644 --- a/ext/Devel/PPPort/parts/inc/exception +++ b/ext/Devel/PPPort/parts/inc/exception @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 2 $ +## $Revision: 3 $ ## $Author: mhx $ -## $Date: 2005/01/31 08:10:51 +0100 $ +## $Date: 2005/02/02 21:48:36 +0100 $ ## ################################################################################ ## @@ -25,54 +25,26 @@ XCPT_RETHROW =implementation -#ifdef dJMPENV - -# ifndef dXCPT +#ifdef NO_XSLOCKS +# ifdef dJMPENV # define dXCPT dJMPENV; int rEtV = 0 # define XCPT_TRY_START JMPENV_PUSH(rEtV); if (rEtV == 0) # define XCPT_TRY_END JMPENV_POP; # define XCPT_CATCH if (rEtV != 0) # define XCPT_RETHROW JMPENV_JUMP(rEtV) +# else +# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 +# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) +# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); +# define XCPT_CATCH if (rEtV != 0) +# define XCPT_RETHROW Siglongjmp(top_env, rEtV) # endif - -#else - -# define dXCPT Sigjmp_buf oldTOP; int rEtV = 0 -# define XCPT_TRY_START Copy(top_env, oldTOP, 1, Sigjmp_buf); rEtV = Sigsetjmp(top_env, 1); if (rEtV == 0) -# define XCPT_TRY_END Copy(oldTOP, top_env, 1, Sigjmp_buf); -# define XCPT_CATCH if (rEtV != 0) -# define XCPT_RETHROW Siglongjmp(top_env, rEtV) - #endif =xsmisc -static void throws_exception(int throw_e) -{ - if (throw_e) - croak("boo\n"); -} - -static int exception(int throw_e) -{ - dTHR; - dXCPT; - SV *caught = get_sv("Devel::PPPort::exception_caught", 0); - - XCPT_TRY_START { - throws_exception(throw_e); - } XCPT_TRY_END - - XCPT_CATCH - { - sv_setiv(caught, 1); - XCPT_RETHROW; - } - - sv_setiv(caught, 0); - - return 42; -} +/* defined in module3.c */ +int exception(int throw_e); =xsubs diff --git a/ext/Devel/PPPort/parts/inc/misc b/ext/Devel/PPPort/parts/inc/misc index f49d7bf..0df0528 100644 --- a/ext/Devel/PPPort/parts/inc/misc +++ b/ext/Devel/PPPort/parts/inc/misc @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 19 $ +## $Revision: 20 $ ## $Author: mhx $ -## $Date: 2005/01/31 08:10:52 +0100 $ +## $Date: 2005/02/02 19:17:33 +0100 $ ## ################################################################################ ## @@ -220,8 +220,9 @@ XS(XS_Devel__PPPort_dXSTARG) { dXSARGS; dXSTARG; + IV iv; SP -= items; - IV iv = SvIV(ST(0)) + 1; + iv = SvIV(ST(0)) + 1; PUSHi(iv); XSRETURN(1); }