summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-21 21:23:00 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-10-21 21:23:00 +0000
commitfd7af155115de4fb7c4275b6a5e511e513d5586e (patch)
tree7150bfedd2e57b1fba52a9d6ee1999f329d21ef7 /ext
parent881e6572cd213db7895c7d5e1dee36e48f67be6a (diff)
downloadperl-fd7af155115de4fb7c4275b6a5e511e513d5586e.tar.gz
Upgrade to Devel::PPPort 3.14_03
p4raw-id: //depot/perl@34555
Diffstat (limited to 'ext')
-rwxr-xr-xext/Devel/PPPort/Changes10
-rw-r--r--ext/Devel/PPPort/PPPort_pm.PL14
-rw-r--r--ext/Devel/PPPort/parts/inc/misc39
-rw-r--r--ext/Devel/PPPort/parts/inc/newSVpv12
-rw-r--r--ext/Devel/PPPort/parts/inc/variables30
-rw-r--r--ext/Devel/PPPort/soak2
-rw-r--r--ext/Devel/PPPort/t/misc.t6
-rw-r--r--ext/Devel/PPPort/t/variables.t1
8 files changed, 79 insertions, 35 deletions
diff --git a/ext/Devel/PPPort/Changes b/ext/Devel/PPPort/Changes
index eff58a4c61..f08dae4d3e 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 68c9b97b34..1420b64328 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 ab5e14e1e4..6f3a7cf122 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 8137f61c1b..aaaed46da2 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 c5a3f489b5..b9bcd13c2c 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 7e5a66b77b..11163926f1 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 653b189241..57ed4df71d 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 0e3a30c220..58d690e621 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]+$/);