Upgrade to Devel::PPPort 3.18_01
Marcus Holland-Moritz [Fri, 12 Jun 2009 11:23:26 +0000 (13:23 +0200)]
19 files changed:
MANIFEST
ext/Devel-PPPort/Changes
ext/Devel-PPPort/Makefile.PL
ext/Devel-PPPort/PPPort_pm.PL
ext/Devel-PPPort/mktests.PL
ext/Devel-PPPort/parts/apicheck.pl
ext/Devel-PPPort/parts/inc/HvNAME [new file with mode: 0644]
ext/Devel-PPPort/parts/inc/gv [new file with mode: 0644]
ext/Devel-PPPort/parts/inc/misc
ext/Devel-PPPort/parts/inc/newSV_type [new file with mode: 0644]
ext/Devel-PPPort/parts/inc/pvs
ext/Devel-PPPort/parts/inc/variables
ext/Devel-PPPort/soak
ext/Devel-PPPort/t/HvNAME.t [new file with mode: 0644]
ext/Devel-PPPort/t/gv.t [new file with mode: 0644]
ext/Devel-PPPort/t/newSV_type.t [new file with mode: 0644]
ext/Devel-PPPort/t/pvs.t
ext/Devel-PPPort/t/variables.t
ext/Devel-PPPort/typemap

index 3dc9ba0..36b66a5 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -290,6 +290,8 @@ ext/Devel-PPPort/parts/inc/cop      Devel::PPPort include
 ext/Devel-PPPort/parts/inc/exception   Devel::PPPort include
 ext/Devel-PPPort/parts/inc/format      Devel::PPPort include
 ext/Devel-PPPort/parts/inc/grok        Devel::PPPort include
+ext/Devel-PPPort/parts/inc/gv  Devel::PPPort include
+ext/Devel-PPPort/parts/inc/HvNAME      Devel::PPPort include
 ext/Devel-PPPort/parts/inc/limits      Devel::PPPort include
 ext/Devel-PPPort/parts/inc/magic       Devel::PPPort include
 ext/Devel-PPPort/parts/inc/memory      Devel::PPPort include
@@ -298,6 +300,7 @@ ext/Devel-PPPort/parts/inc/mPUSH    Devel::PPPort include
 ext/Devel-PPPort/parts/inc/MY_CXT      Devel::PPPort include
 ext/Devel-PPPort/parts/inc/newCONSTSUB Devel::PPPort include
 ext/Devel-PPPort/parts/inc/newRV       Devel::PPPort include
+ext/Devel-PPPort/parts/inc/newSV_type  Devel::PPPort include
 ext/Devel-PPPort/parts/inc/newSVpv     Devel::PPPort include
 ext/Devel-PPPort/parts/inc/podtest     Devel::PPPort include
 ext/Devel-PPPort/parts/inc/ppphbin     Devel::PPPort include
@@ -366,6 +369,8 @@ ext/Devel-PPPort/t/cop.t    Devel::PPPort test file
 ext/Devel-PPPort/t/exception.t Devel::PPPort test file
 ext/Devel-PPPort/t/format.t    Devel::PPPort test file
 ext/Devel-PPPort/t/grok.t      Devel::PPPort test file
+ext/Devel-PPPort/t/gv.t        Devel::PPPort test file
+ext/Devel-PPPort/t/HvNAME.t    Devel::PPPort test file
 ext/Devel-PPPort/t/limits.t    Devel::PPPort test file
 ext/Devel-PPPort/t/magic.t     Devel::PPPort test file
 ext/Devel-PPPort/t/memory.t    Devel::PPPort test file
@@ -374,6 +379,7 @@ ext/Devel-PPPort/t/mPUSH.t  Devel::PPPort test file
 ext/Devel-PPPort/t/MY_CXT.t    Devel::PPPort test file
 ext/Devel-PPPort/t/newCONSTSUB.t       Devel::PPPort test file
 ext/Devel-PPPort/t/newRV.t     Devel::PPPort test file
+ext/Devel-PPPort/t/newSV_type.t        Devel::PPPort test file
 ext/Devel-PPPort/t/newSVpv.t   Devel::PPPort test file
 ext/Devel-PPPort/TODO          Devel::PPPort Todo
 ext/Devel-PPPort/t/podtest.t   Devel::PPPort test file
index 8ad4106..40deaba 100644 (file)
@@ -1,3 +1,24 @@
+3.18_01 - 2009-06-12
+
+    * fix CPAN #44614: Please support XSBODY
+    * fix CPAN #44655: Please support SVfARG
+    * added support for the following API
+        gv_fetchpvn_flags
+        gv_fetchpvs
+        gv_stashpvs
+        GvSVn
+        HvNAME_get
+        HvNAMELEN_get
+        isGV_with_GP
+        newSV_type
+        PL_error_count
+        PL_in_my
+        PL_in_my_stash
+        SVfARG
+        XSPROTO
+      (thanks to Goro Fuji for providing a patch to
+      implement almost all of these, fixes CPAN #44087)
+
 3.18 - 2009-06-12
 
     * remove MAN3PODS option from Makefile.PL, which is
index f0023db..67eebc1 100644 (file)
@@ -4,9 +4,9 @@
 #
 ################################################################################
 #
-#  $Revision: 31 $
+#  $Revision: 30 $
 #  $Author: mhx $
-#  $Date: 2009/06/12 12:45:44 +0200 $
+#  $Date: 2009/06/12 04:07:05 +0200 $
 #
 ################################################################################
 #
index 83a4739..30f1323 100644 (file)
@@ -4,9 +4,9 @@
 #
 ################################################################################
 #
-#  $Revision: 64 $
+#  $Revision: 65 $
 #  $Author: mhx $
-#  $Date: 2009/01/18 14:10:49 +0100 $
+#  $Date: 2009/06/12 04:10:36 +0200 $
 #
 ################################################################################
 #
@@ -372,9 +372,9 @@ __DATA__
 #
 ################################################################################
 #
-#  $Revision: 64 $
+#  $Revision: 65 $
 #  $Author: mhx $
-#  $Date: 2009/01/18 14:10:49 +0100 $
+#  $Date: 2009/06/12 04:10:36 +0200 $
 #
 ################################################################################
 #
@@ -535,7 +535,7 @@ package Devel::PPPort;
 use strict;
 use vars qw($VERSION $data);
 
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.18 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.18_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
 
 sub _init_data
 {
@@ -628,6 +628,8 @@ __DATA__
 
 %include SvREFCNT
 
+%include newSV_type
+
 %include newSVpv
 
 %include SvPV
@@ -638,6 +640,10 @@ __DATA__
 
 %include shared_pv
 
+%include HvNAME
+
+%include gv
+
 %include warn
 
 %include pvs
index 332f9a4..98b80ed 100644 (file)
@@ -4,9 +4,9 @@
 #
 ################################################################################
 #
-#  $Revision: 32 $
+#  $Revision: 31 $
 #  $Author: mhx $
-#  $Date: 2009/06/12 12:46:07 +0200 $
+#  $Date: 2009/06/11 20:53:42 +0200 $
 #
 ################################################################################
 #
index 3590142..e6caab5 100644 (file)
@@ -5,9 +5,9 @@
 #
 ################################################################################
 #
-#  $Revision: 34 $
+#  $Revision: 35 $
 #  $Author: mhx $
-#  $Date: 2009/01/18 14:10:51 +0100 $
+#  $Date: 2009/06/12 12:29:35 +0200 $
 #
 ################################################################################
 #
@@ -156,6 +156,7 @@ print OUT <<HEAD;
 #define NEED_my_strlcpy
 #define NEED_newCONSTSUB
 #define NEED_newRV_noinc
+#define NEED_newSV_type
 #define NEED_newSVpvn_share
 #define NEED_pv_display
 #define NEED_pv_escape
diff --git a/ext/Devel-PPPort/parts/inc/HvNAME b/ext/Devel-PPPort/parts/inc/HvNAME
new file mode 100644 (file)
index 0000000..135549d
--- /dev/null
@@ -0,0 +1,45 @@
+################################################################################
+##
+##  $Revision: 1 $
+##  $Author: mhx $
+##  $Date: 2009/06/12 12:29:57 +0200 $
+##
+################################################################################
+##
+##  Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
+##  Version 2.x, Copyright (C) 2001, Paul Marquess.
+##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+##  This program is free software; you can redistribute it and/or
+##  modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+__UNDEFINED__ HvNAME_get(hv) HvNAME(hv)
+
+__UNDEFINED__ HvNAMELEN_get(hv) (HvNAME_get(hv) ? (I32)strlen(HvNAME_get(hv)) : 0)
+
+=xsubs
+
+char*
+HvNAME_get(hv)
+       HV *hv
+
+int
+HvNAMELEN_get(hv)
+       HV *hv
+
+=tests plan => 4
+
+ok(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
+ok(Devel::PPPort::HvNAME_get({}), undef);
+
+ok(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
+ok(Devel::PPPort::HvNAMELEN_get({}), 0);
+
diff --git a/ext/Devel-PPPort/parts/inc/gv b/ext/Devel-PPPort/parts/inc/gv
new file mode 100644 (file)
index 0000000..1b911e7
--- /dev/null
@@ -0,0 +1,66 @@
+################################################################################
+##
+##  $Revision: 1 $
+##  $Author: mhx $
+##  $Date: 2009/06/12 12:29:56 +0200 $
+##
+################################################################################
+##
+##  Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
+##  Version 2.x, Copyright (C) 2001, Paul Marquess.
+##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+##  This program is free software; you can redistribute it and/or
+##  modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+__UNDEFINED__
+
+=implementation
+
+__UNDEFINED__ GvSVn(gv)        GvSV(gv)
+__UNDEFINED__ isGV_with_GP(gv) isGV(gv)
+
+=xsubs
+
+int
+GvSVn()
+       PREINIT:
+               GV* gv;
+       CODE:
+               RETVAL = 0;
+               gv = gv_fetchpvs("Devel::PPPort::GvTest", GV_ADDMULTI, SVt_PVGV);
+               if (GvSVn(gv) != NULL)
+               {
+                 RETVAL++;
+               }
+       OUTPUT:
+               RETVAL
+
+int
+isGV_with_GP()
+       PREINIT:
+               GV* gv;
+       CODE:
+               RETVAL = 0;
+               gv = gv_fetchpvs("Devel::PPPort::GvTest", GV_ADDMULTI, SVt_PVGV);
+               if (isGV_with_GP(gv))
+               {
+                 RETVAL++;
+               }
+               if (!isGV(&PL_sv_undef))
+               {
+                 RETVAL++;
+               }
+       OUTPUT:
+               RETVAL
+
+
+=tests plan => 2
+
+ok(Devel::PPPort::GvSVn(), 1);
+
+ok(Devel::PPPort::isGV_with_GP(), 2)
index 9900812..3844bbb 100644 (file)
@@ -1,8 +1,8 @@
 ################################################################################
 ##
-##  $Revision: 52 $
+##  $Revision: 53 $
 ##  $Author: mhx $
-##  $Date: 2009/03/15 06:51:00 +0100 $
+##  $Date: 2009/03/31 23:05:55 +0200 $
 ##
 ################################################################################
 ##
@@ -209,6 +209,9 @@ __UNDEFINED__  XSprePUSH       (sp = PL_stack_base + ax - 1)
       } STMT_END
 #endif
 
+__UNDEFINED__  XSPROTO(name)   void name(pTHX_ CV* cv)
+__UNDEFINED__  SVfARG(p)       ((void*)(p))
+
 __UNDEFINED__  PERL_ABS(x)     ((x) < 0 ? -(x) : (x))
 
 __UNDEFINED__  dVAR            dNOOP
@@ -282,6 +285,9 @@ __UNDEFINED__ isXDIGIT(c)   (isDIGIT(c) || ((c) >= 'a' && (c) <= 'f') || ((c) >= '
 
 =xsmisc
 
+typedef XSPROTO(XSPROTO_test_t);
+typedef XSPROTO_test_t *XSPROTO_test_t_ptr;
+
 XS(XS_Devel__PPPort_dXSTARG);  /* prototype */
 XS(XS_Devel__PPPort_dXSTARG)
 {
@@ -309,7 +315,10 @@ XS(XS_Devel__PPPort_dAXMARK)
 
 =xsboot
 
-newXS("Devel::PPPort::dXSTARG", XS_Devel__PPPort_dXSTARG, file);
+{
+  XSPROTO_test_t_ptr p = &XS_Devel__PPPort_dXSTARG;
+  newXS("Devel::PPPort::dXSTARG", *p, file);
+}
 newXS("Devel::PPPort::dAXMARK", XS_Devel__PPPort_dAXMARK, file);
 
 =xsubs
@@ -454,7 +463,7 @@ SVf(x)
        SV *x
        PPCODE:
 #if { VERSION >= 5.004 }
-               x = sv_2mortal(newSVpvf("[%"SVf"]", x));
+               x = sv_2mortal(newSVpvf("[%"SVf"]", SVfARG(x)));
 #endif
                XPUSHs(x);
                XSRETURN(1);
diff --git a/ext/Devel-PPPort/parts/inc/newSV_type b/ext/Devel-PPPort/parts/inc/newSV_type
new file mode 100644 (file)
index 0000000..06ebdb4
--- /dev/null
@@ -0,0 +1,86 @@
+################################################################################
+##
+##  $Revision: 1 $
+##  $Author: mhx $
+##  $Date: 2009/06/12 12:29:57 +0200 $
+##
+################################################################################
+##
+##  Version 3.x, Copyright (C) 2004-2009, Marcus Holland-Moritz.
+##  Version 2.x, Copyright (C) 2001, Paul Marquess.
+##  Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
+##
+##  This program is free software; you can redistribute it and/or
+##  modify it under the same terms as Perl itself.
+##
+################################################################################
+
+=provides
+
+newSV_type
+
+=implementation
+
+#ifndef newSV_type
+
+#if { NEED newSV_type }
+
+SV*
+newSV_type(pTHX_ svtype const t)
+{
+  SV* const sv = newSV(0);
+  sv_upgrade(sv, t);
+  return sv;
+}
+
+#endif
+
+#endif
+
+=xsinit
+
+#define NEED_newSV_type
+
+=xsubs
+
+int
+newSV_type()
+       PREINIT:
+               SV* sv;
+       CODE:
+               RETVAL = 0;
+               sv = newSV_type(SVt_NULL);
+               if (SvTYPE(sv) == SVt_NULL)
+               {
+                 RETVAL++;
+               }
+               SvREFCNT_dec(sv);
+
+               sv = newSV_type(SVt_PVIV);
+               if (SvTYPE(sv) == SVt_PVIV)
+               {
+                 RETVAL++;
+               }
+               SvREFCNT_dec(sv);
+
+               sv = newSV_type(SVt_PVHV);
+               if (SvTYPE(sv) == SVt_PVHV)
+               {
+                 RETVAL++;
+               }
+               SvREFCNT_dec(sv);
+
+               sv = newSV_type(SVt_PVAV);
+               if (SvTYPE(sv) == SVt_PVAV)
+               {
+                 RETVAL++;
+               }
+               SvREFCNT_dec(sv);
+       OUTPUT:
+               RETVAL
+
+
+=tests plan => 1
+
+ok(Devel::PPPort::newSV_type(), 4);
+
index 73bc9fb..71485ad 100644 (file)
@@ -1,8 +1,8 @@
 ################################################################################
 ##
-##  $Revision: 9 $
+##  $Revision: 11 $
 ##  $Author: mhx $
-##  $Date: 2009/01/18 14:10:52 +0100 $
+##  $Date: 2009/06/12 12:19:15 +0200 $
 ##
 ################################################################################
 ##
@@ -35,6 +35,10 @@ __UNDEFINED__  sv_setpvs(sv, str)          sv_setpvn(sv, str "", sizeof(str) - 1
 __UNDEFINED__  hv_fetchs(hv, key, lval)    hv_fetch(hv, key "", sizeof(key) - 1, lval)
 __UNDEFINED__  hv_stores(hv, key, val)     hv_store(hv, key "", sizeof(key) - 1, val, 0)
 
+__UNDEFINED__  gv_fetchpvn_flags(name, len, flags, svt) gv_fetchpv(name, flags, svt)
+__UNDEFINED__  gv_fetchpvs(name, flags, svt)            gv_fetchpvn_flags(name "", sizeof(name) - 1, flags, svt)
+__UNDEFINED__  gv_stashpvs(name, flags)                 gv_stashpvn(name "", sizeof(name) - 1, flags)
+
 =xsubs
 
 void
@@ -78,7 +82,29 @@ hv_stores(hv, sv)
        PPCODE:
                (void) hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc_simple(sv));
 
-=tests plan => 8
+SV*
+gv_fetchpvn_flags()
+       CODE:
+               RETVAL = newRV_inc((SV*)gv_fetchpvn_flags("Devel::PPPort::VERSION", sizeof("Devel::PPPort::VERSION")-1, 0, SVt_PV));
+       OUTPUT:
+               RETVAL
+
+SV*
+gv_fetchpvs()
+       CODE:
+               RETVAL = newRV_inc((SV*)gv_fetchpvs("Devel::PPPort::VERSION", 0, SVt_PV));
+       OUTPUT:
+               RETVAL
+
+SV*
+gv_stashpvs()
+       CODE:
+               RETVAL = newRV_inc((SV*)gv_stashpvs("Devel::PPPort", 0));
+       OUTPUT:
+               RETVAL
+
+
+=tests plan => 11
 
 my $x = 'foo';
 
@@ -97,3 +123,6 @@ ok(scalar keys %h, 2);
 ok(exists $h{'hv_stores'});
 ok($h{'hv_stores'}, 4711);
 ok(Devel::PPPort::hv_fetchs(\%h), 42);
+ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
+ok(Devel::PPPort::gv_fetchpvs(),       \*Devel::PPPort::VERSION);
+ok(Devel::PPPort::gv_stashpvs(),       \%Devel::PPPort::);
index 3058412..515e620 100644 (file)
@@ -1,8 +1,8 @@
 ################################################################################
 ##
-##  $Revision: 19 $
+##  $Revision: 20 $
 ##  $Author: mhx $
-##  $Date: 2009/01/18 14:10:53 +0100 $
+##  $Date: 2009/06/12 04:10:50 +0200 $
 ##
 ################################################################################
 ##
@@ -36,9 +36,12 @@ PL_diehook
 PL_dirty
 PL_dowarn
 PL_errgv
+PL_error_count
 PL_expect
 PL_hexdigit
 PL_hints
+PL_in_my
+PL_in_my_stash
 PL_laststatval
 PL_lex_state
 PL_lex_stuff
@@ -112,9 +115,11 @@ __NEED_VAR__ U32 PL_signals = D_PPP_PERL_SIGNALS_INIT;
 #  define PL_dirty                  dirty
 #  define PL_dowarn                 dowarn
 #  define PL_errgv                  errgv
+#  define PL_error_count            error_count
 #  define PL_expect                 expect
 #  define PL_hexdigit               hexdigit
 #  define PL_hints                  hints
+#  define PL_in_my                  in_my
 #  define PL_laststatval            laststatval
 #  define PL_lex_state              lex_state
 #  define PL_lex_stuff              lex_stuff
@@ -190,6 +195,10 @@ __NEED_DUMMY_VAR__ yy_parser PL_parser;
 # define PL_lex_state      D_PPP_my_PL_parser_var(lex_state)
 # define PL_lex_stuff      D_PPP_my_PL_parser_var(lex_stuff)
 # define PL_tokenbuf       D_PPP_my_PL_parser_var(tokenbuf)
+# define PL_in_my          D_PPP_my_PL_parser_var(in_my)
+# define PL_in_my_stash    D_PPP_my_PL_parser_var(in_my_stash)
+# define PL_error_count    D_PPP_my_PL_parser_var(error_count)
+
 
 #else
 
@@ -229,6 +238,11 @@ int dummy_parser_warning(void);
                                     count++;                     \
                                   } STMT_END
 
+#define ppp_PARSERVAR_dummy       STMT_START {                   \
+                                    mXPUSHi(1);                  \
+                                    count++;                     \
+                                  } STMT_END
+
 #if { VERSION < 5.004 }
 # define ppp_rsfp_t FILE *
 #else
@@ -249,6 +263,20 @@ int dummy_parser_warning(void);
 # define ppp_lex_state_t U8
 #endif
 
+#if { VERSION < 5.6.0 }
+# define ppp_in_my_t bool
+#elif { VERSION < 5.9.5 }
+# define ppp_in_my_t I32
+#else
+# define ppp_in_my_t U16
+#endif
+
+#if { VERSION < 5.9.5 }
+# define ppp_error_count_t I32
+#else
+# define ppp_error_count_t U8
+#endif
+
 =xsubs
 
 int
@@ -379,7 +407,13 @@ other_variables()
                ppp_PARSERVAR(char *, PL_bufend);
                ppp_PARSERVAR(ppp_lex_state_t, PL_lex_state);
                ppp_PARSERVAR(SV *, PL_lex_stuff);
-
+               ppp_PARSERVAR(ppp_error_count_t, PL_error_count);
+               ppp_PARSERVAR(ppp_in_my_t, PL_in_my);
+#if { VERSION >= 5.5.0 }
+               ppp_PARSERVAR(HV*, PL_in_my_stash);
+#else
+               ppp_PARSERVAR_dummy;
+#endif
                XSRETURN(count);
 
 int
@@ -389,7 +423,7 @@ no_dummy_parser_vars(check)
 int
 dummy_parser_warning()
 
-=tests plan => 49
+=tests plan => 52
 
 ok(Devel::PPPort::compare_PL_signals());
 
index 8473ded..5c9b484 100644 (file)
@@ -33,7 +33,7 @@ use File::Find;
 use List::Util qw(max);
 use Config;
 
-my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.18 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.18_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
 
 $| = 1;
 my %OPT = (
diff --git a/ext/Devel-PPPort/t/HvNAME.t b/ext/Devel-PPPort/t/HvNAME.t
new file mode 100644 (file)
index 0000000..f54fac2
--- /dev/null
@@ -0,0 +1,56 @@
+################################################################################
+#
+#            !!!!!   Do NOT edit this file directly!   !!!!!
+#
+#            Edit mktests.PL and/or parts/inc/HvNAME instead.
+#
+#  This file was automatically generated from the definition files in the
+#  parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+#  works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+  if ($ENV{'PERL_CORE'}) {
+    chdir 't' if -d 't';
+    @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+    require Config; import Config;
+    use vars '%Config';
+    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+      print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+      exit 0;
+    }
+  }
+  else {
+    unshift @INC, 't';
+  }
+
+  sub load {
+    eval "use Test";
+    require 'testutil.pl' if $@;
+  }
+
+  if (4) {
+    load();
+    plan(tests => 4);
+  }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
+ok(Devel::PPPort::HvNAME_get({}), undef);
+
+ok(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
+ok(Devel::PPPort::HvNAMELEN_get({}), 0);
+
diff --git a/ext/Devel-PPPort/t/gv.t b/ext/Devel-PPPort/t/gv.t
new file mode 100644 (file)
index 0000000..3bf9ce6
--- /dev/null
@@ -0,0 +1,54 @@
+################################################################################
+#
+#            !!!!!   Do NOT edit this file directly!   !!!!!
+#
+#            Edit mktests.PL and/or parts/inc/gv instead.
+#
+#  This file was automatically generated from the definition files in the
+#  parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+#  works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+  if ($ENV{'PERL_CORE'}) {
+    chdir 't' if -d 't';
+    @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+    require Config; import Config;
+    use vars '%Config';
+    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+      print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+      exit 0;
+    }
+  }
+  else {
+    unshift @INC, 't';
+  }
+
+  sub load {
+    eval "use Test";
+    require 'testutil.pl' if $@;
+  }
+
+  if (2) {
+    load();
+    plan(tests => 2);
+  }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::GvSVn(), 1);
+
+ok(Devel::PPPort::isGV_with_GP(), 2)
+
diff --git a/ext/Devel-PPPort/t/newSV_type.t b/ext/Devel-PPPort/t/newSV_type.t
new file mode 100644 (file)
index 0000000..1b3233e
--- /dev/null
@@ -0,0 +1,52 @@
+################################################################################
+#
+#            !!!!!   Do NOT edit this file directly!   !!!!!
+#
+#            Edit mktests.PL and/or parts/inc/newSV_type instead.
+#
+#  This file was automatically generated from the definition files in the
+#  parts/inc/ subdirectory by mktests.PL. To learn more about how all this
+#  works, please read the F<HACKERS> file that came with this distribution.
+#
+################################################################################
+
+BEGIN {
+  if ($ENV{'PERL_CORE'}) {
+    chdir 't' if -d 't';
+    @INC = ('../lib', '../ext/Devel-PPPort/t') if -d '../lib' && -d '../ext';
+    require Config; import Config;
+    use vars '%Config';
+    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
+      print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
+      exit 0;
+    }
+  }
+  else {
+    unshift @INC, 't';
+  }
+
+  sub load {
+    eval "use Test";
+    require 'testutil.pl' if $@;
+  }
+
+  if (1) {
+    load();
+    plan(tests => 1);
+  }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+package Devel::PPPort;
+use vars '@ISA';
+require DynaLoader;
+@ISA = qw(DynaLoader);
+bootstrap Devel::PPPort;
+
+package main;
+
+ok(Devel::PPPort::newSV_type(), 4);
+
index 4a85e49..7886096 100644 (file)
@@ -30,9 +30,9 @@ BEGIN {
     require 'testutil.pl' if $@;
   }
 
-  if (8) {
+  if (11) {
     load();
-    plan(tests => 8);
+    plan(tests => 11);
   }
 }
 
@@ -65,4 +65,7 @@ ok(scalar keys %h, 2);
 ok(exists $h{'hv_stores'});
 ok($h{'hv_stores'}, 4711);
 ok(Devel::PPPort::hv_fetchs(\%h), 42);
+ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
+ok(Devel::PPPort::gv_fetchpvs(),       \*Devel::PPPort::VERSION);
+ok(Devel::PPPort::gv_stashpvs(),       \%Devel::PPPort::);
 
index da7b99d..ef1ac8b 100644 (file)
@@ -30,9 +30,9 @@ BEGIN {
     require 'testutil.pl' if $@;
   }
 
-  if (49) {
+  if (52) {
     load();
-    plan(tests => 49);
+    plan(tests => 52);
   }
 }
 
index f2118a8..7225c40 100644 (file)
@@ -4,9 +4,9 @@
 #
 ################################################################################
 #
-#  $Revision: 8 $
+#  $Revision: 9 $
 #  $Author: mhx $
-#  $Date: 2009/01/18 14:10:48 +0100 $
+#  $Date: 2009/06/12 04:07:19 +0200 $
 #
 ################################################################################
 #
 
 UV                     T_UV
 NV                      T_NV
+HV *                   T_HVREF
 
 INPUT
 T_UV
        $var = ($type)SvUV($arg)
 T_NV
        $var = ($type)SvNV($arg)
+T_HVREF
+       if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
+           $var = (HV*)SvRV($arg);
+       else
+           Perl_croak(aTHX_ \"$var is not a hash reference\")
 
 OUTPUT
 T_UV