From: Marcus Holland-Moritz Date: Tue, 21 Oct 2008 21:23:00 +0000 (+0000) Subject: Upgrade to Devel::PPPort 3.14_03 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd7af155115de4fb7c4275b6a5e511e513d5586e;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Devel::PPPort 3.14_03 p4raw-id: //depot/perl@34555 --- diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes index eff58a4..f08dae4 100755 --- a/ext/Devel/PPPort/Changes +++ b/ext/Devel/PPPort/Changes @@ -1,3 +1,13 @@ +3.14_03 - 2008-10-21 + + * fix C++ compilation issue with last release + (spotted by Nicholas Clark) + * added support for the following API + Perl_ppaddr_t + Perl_check_t + CPERLscope + (fixes CPAN #40078) + 3.14_02 - 2008-10-12 * added support for the following API diff --git a/ext/Devel/PPPort/PPPort_pm.PL b/ext/Devel/PPPort/PPPort_pm.PL index 68c9b97..1420b64 100644 --- a/ext/Devel/PPPort/PPPort_pm.PL +++ b/ext/Devel/PPPort/PPPort_pm.PL @@ -4,9 +4,9 @@ # ################################################################################ # -# $Revision: 61 $ +# $Revision: 62 $ # $Author: mhx $ -# $Date: 2008/10/12 13:54:21 +0200 $ +# $Date: 2008/10/21 23:12:30 +0200 $ # ################################################################################ # @@ -372,9 +372,9 @@ __DATA__ # ################################################################################ # -# $Revision: 61 $ +# $Revision: 62 $ # $Author: mhx $ -# $Date: 2008/10/12 13:54:21 +0200 $ +# $Date: 2008/10/21 23:12:30 +0200 $ # ################################################################################ # @@ -535,7 +535,7 @@ package Devel::PPPort; use strict; use vars qw($VERSION $data); -$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.14_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.14_03 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; sub _init_data { @@ -602,6 +602,8 @@ __DATA__ %include version +%include threads + %include limits %include uv @@ -612,8 +614,6 @@ __DATA__ %include variables -%include threads - %include mPUSH %include call diff --git a/ext/Devel/PPPort/parts/inc/misc b/ext/Devel/PPPort/parts/inc/misc index ab5e14e..6f3a7cf 100644 --- a/ext/Devel/PPPort/parts/inc/misc +++ b/ext/Devel/PPPort/parts/inc/misc @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 46 $ +## $Revision: 47 $ ## $Author: mhx $ -## $Date: 2008/07/11 14:00:05 +0200 $ +## $Date: 2008/10/21 23:14:09 +0200 $ ## ################################################################################ ## @@ -215,6 +215,8 @@ __UNDEFINED__ SVf "_" __UNDEFINED__ UTF8_MAXBYTES UTF8_MAXLEN +__UNDEFINED__ CPERLscope(x) x + __UNDEFINED__ PERL_HASH(hash,str,len) \ STMT_START { \ const char *s_PeRlHaSh = str; \ @@ -235,6 +237,19 @@ __UNDEFINED__ PERL_HASH(hash,str,len) \ # endif #endif +/* provide these typedefs for older perls */ +#if { VERSION < 5.9.3 } + +# ifdef ARGSproto +typedef OP* (CPERLscope(*Perl_ppaddr_t))(ARGSproto); +# else +typedef OP* (CPERLscope(*Perl_ppaddr_t))(pTHX); +# endif + +typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); + +#endif + =xsmisc XS(XS_Devel__PPPort_dXSTARG); /* prototype */ @@ -382,7 +397,23 @@ SVf(x) XPUSHs(x); XSRETURN(1); -=tests plan => 32 +void +Perl_ppaddr_t(string) + char *string + PREINIT: + Perl_ppaddr_t lower; + PPCODE: + lower = PL_ppaddr[OP_LC]; + PUSHMARK(SP); + mXPUSHs(newSVpv(string, 0)); + PUTBACK; + ENTER; + (void)*(lower)(aTHXR); + SPAGAIN; + LEAVE; + XSRETURN(1); + +=tests plan => 33 use vars qw($my_sv @my_av %my_hv); @@ -448,3 +479,5 @@ ok(Devel::PPPort::PERL_ABS(-13), 13); ok(Devel::PPPort::SVf(42), $] >= 5.004 ? '[42]' : '42'); ok(Devel::PPPort::SVf('abc'), $] >= 5.004 ? '[abc]' : 'abc'); +ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo"); + diff --git a/ext/Devel/PPPort/parts/inc/newSVpv b/ext/Devel/PPPort/parts/inc/newSVpv index 8137f61..aaaed46 100644 --- a/ext/Devel/PPPort/parts/inc/newSVpv +++ b/ext/Devel/PPPort/parts/inc/newSVpv @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 4 $ +## $Revision: 5 $ ## $Author: mhx $ -## $Date: 2008/01/04 13:10:54 +0100 $ +## $Date: 2008/10/21 23:14:47 +0200 $ ## ################################################################################ ## @@ -22,6 +22,12 @@ newSVpvn_flags =implementation +#if { VERSION < 5.6.0 } +# define D_PPP_CONSTPV_ARG(x) ((char *) (x)) +#else +# define D_PPP_CONSTPV_ARG(x) (x) +#endif + __UNDEFINED__ newSVpvn(data,len) ((data) \ ? ((len) ? newSVpv((data), (len)) : newSVpv("", 0)) \ : newSV(0)) @@ -37,7 +43,7 @@ __UNDEFINED__ SVf_UTF8 0 SV * newSVpvn_flags(pTHX_ const char *s, STRLEN len, U32 flags) { - SV *sv = newSVpvn(s, len); + SV *sv = newSVpvn(D_PPP_CONSTPV_ARG(s), len); SvFLAGS(sv) |= (flags & SVf_UTF8); return (flags & SVs_TEMP) ? sv_2mortal(sv) : sv; } diff --git a/ext/Devel/PPPort/parts/inc/variables b/ext/Devel/PPPort/parts/inc/variables index c5a3f48..b9bcd13 100644 --- a/ext/Devel/PPPort/parts/inc/variables +++ b/ext/Devel/PPPort/parts/inc/variables @@ -1,8 +1,8 @@ ################################################################################ ## -## $Revision: 17 $ +## $Revision: 18 $ ## $Author: mhx $ -## $Date: 2008/10/12 20:53:47 +0200 $ +## $Date: 2008/10/21 23:15:31 +0200 $ ## ################################################################################ ## @@ -229,15 +229,21 @@ int dummy_parser_warning(void); count++; \ } STMT_END -#if PERL_BCDVERSION < 0x5006000 +#if { VERSION < 5.004 } +# define ppp_rsfp_t FILE * +#else +# define ppp_rsfp_t PerlIO * +#endif + +#if { VERSION < 5.6.0 } # define ppp_expect_t expectation -#elif PERL_BCDVERSION < 0x5009005 +#elif { VERSION < 5.9.5 } # define ppp_expect_t int #else # define ppp_expect_t U8 #endif -#if PERL_BCDVERSION < 0x5009005 +#if { VERSION < 5.9.5 } # define ppp_lex_state_t U32 #else # define ppp_lex_state_t U8 @@ -294,18 +300,6 @@ PL_Sv() RETVAL SV * -PL_rsfp() - PREINIT: - void * volatile my_rsfp; - /* no pointer test, as we don't know the exact type */ - CODE: - my_rsfp = PL_rsfp; - RETVAL = newSViv(PL_rsfp != 0); - PL_rsfp = my_rsfp; - OUTPUT: - RETVAL - -SV * PL_tokenbuf() CODE: RETVAL = newSViv(PL_tokenbuf[0]); @@ -378,6 +372,7 @@ other_variables() ppp_PARSERVAR(ppp_expect_t, PL_expect); ppp_PARSERVAR(line_t, PL_copline); + ppp_PARSERVAR(ppp_rsfp_t, PL_rsfp); ppp_PARSERVAR(AV *, PL_rsfp_filters); ppp_PARSERVAR(SV *, PL_linestr); ppp_PARSERVAR(char *, PL_bufptr); @@ -403,7 +398,6 @@ ok(&Devel::PPPort::PL_sv_yes()); ok(!&Devel::PPPort::PL_sv_no()); ok(&Devel::PPPort::PL_na("abcd"), 4); ok(&Devel::PPPort::PL_Sv(), "mhx"); -ok(defined &Devel::PPPort::PL_rsfp()); ok(defined &Devel::PPPort::PL_tokenbuf()); ok($] >= 5.009005 || &Devel::PPPort::PL_parser()); ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/); diff --git a/ext/Devel/PPPort/soak b/ext/Devel/PPPort/soak index 7e5a66b..1116392 100644 --- a/ext/Devel/PPPort/soak +++ b/ext/Devel/PPPort/soak @@ -33,7 +33,7 @@ use File::Find; use List::Util qw(max); use Config; -my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.14_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; +my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.14_03 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' }; $| = 1; my %OPT = ( diff --git a/ext/Devel/PPPort/t/misc.t b/ext/Devel/PPPort/t/misc.t index 653b189..57ed4df 100644 --- a/ext/Devel/PPPort/t/misc.t +++ b/ext/Devel/PPPort/t/misc.t @@ -30,9 +30,9 @@ BEGIN { require 'testutil.pl' if $@; } - if (32) { + if (33) { load(); - plan(tests => 32); + plan(tests => 33); } } @@ -112,3 +112,5 @@ ok(Devel::PPPort::PERL_ABS(-13), 13); ok(Devel::PPPort::SVf(42), $] >= 5.004 ? '[42]' : '42'); ok(Devel::PPPort::SVf('abc'), $] >= 5.004 ? '[abc]' : 'abc'); +ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo"); + diff --git a/ext/Devel/PPPort/t/variables.t b/ext/Devel/PPPort/t/variables.t index 0e3a30c..58d690e 100644 --- a/ext/Devel/PPPort/t/variables.t +++ b/ext/Devel/PPPort/t/variables.t @@ -55,7 +55,6 @@ ok(&Devel::PPPort::PL_sv_yes()); ok(!&Devel::PPPort::PL_sv_no()); ok(&Devel::PPPort::PL_na("abcd"), 4); ok(&Devel::PPPort::PL_Sv(), "mhx"); -ok(defined &Devel::PPPort::PL_rsfp()); ok(defined &Devel::PPPort::PL_tokenbuf()); ok($] >= 5.009005 || &Devel::PPPort::PL_parser()); ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/);