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/podtest Devel::PPPort include
ext/Devel/PPPort/parts/inc/ppphbin Devel::PPPort include
ext/Devel/PPPort/parts/inc/ppphdoc Devel::PPPort include
ext/Devel/PPPort/parts/inc/ppphtest Devel::PPPort include
ext/Devel/PPPort/parts/inc/pvs Devel::PPPort include
ext/Devel/PPPort/parts/inc/snprintf Devel::PPPort include
ext/Devel/PPPort/parts/inc/SvPV Devel::PPPort include
+ext/Devel/PPPort/parts/inc/SvREFCNT Devel::PPPort include
ext/Devel/PPPort/parts/inc/Sv_set Devel::PPPort include
ext/Devel/PPPort/parts/inc/sv_xpvf Devel::PPPort include
ext/Devel/PPPort/parts/inc/threads Devel::PPPort include
ext/Devel/PPPort/t/newCONSTSUB.t Devel::PPPort test file
ext/Devel/PPPort/t/newRV.t Devel::PPPort test file
ext/Devel/PPPort/TODO Devel::PPPort Todo
+ext/Devel/PPPort/t/podtest.t Devel::PPPort test file
ext/Devel/PPPort/t/ppphtest.t Devel::PPPort test file
ext/Devel/PPPort/t/pvs.t Devel::PPPort test file
ext/Devel/PPPort/t/snprintf.t Devel::PPPort test file
ext/Devel/PPPort/t/SvPV.t Devel::PPPort test file
+ext/Devel/PPPort/t/SvREFCNT.t Devel::PPPort test file
ext/Devel/PPPort/t/Sv_set.t Devel::PPPort test file
ext/Devel/PPPort/t/sv_xpvf.t Devel::PPPort test file
ext/Devel/PPPort/t/testutil.pl Devel::PPPort test utilities
+3.08_02 - 2006-05-22
+
+ * fix a POD error
+ * added POD test
+ * changed hv_stores() to omit the hash parameter
+ * improve soak script
+ - can now search directories for perl executables
+ - can use only perl binaries of at least a certain
+ revision using the --min option
+ - sorts tests by perl version
+ - shows a summary of failed versions
+ * added support for the following API
+ PERL_USE_GCC_BRACE_GROUPS
+ PoisonFree
+ PoisonNew
+ PoisonWith
+ SvREFCNT_inc
+ SvREFCNT_inc_NN
+ SvREFCNT_inc_simple
+ SvREFCNT_inc_simple_NN
+ SvREFCNT_inc_simple_void
+ SvREFCNT_inc_simple_void_NN
+ SvREFCNT_inc_void
+ SvREFCNT_inc_void_NN
+
3.08_01 - 2006-05-20
* update NOOP and dNOOP to include lint directives
#
################################################################################
#
-# $Revision: 42 $
+# $Revision: 43 $
# $Author: mhx $
-# $Date: 2006/05/18 23:13:47 +0200 $
+# $Date: 2006/05/22 00:51:20 +0200 $
#
################################################################################
#
PERL_UNUSED_VAR
PERL_UQUAD_MAX
PERL_UQUAD_MIN
+ PERL_USE_GCC_BRACE_GROUPS
PERL_USHORT_MAX
PERL_USHORT_MIN
PERL_VERSION
pMY_CXT
pMY_CXT_
Poison
+ PoisonFree
+ PoisonNew
+ PoisonWith
pTHX
pTHX_
PTR2IV
SvPVbyte
SvPVX_const
SvPVX_mutable
+ SvREFCNT_inc
+ SvREFCNT_inc_NN
+ SvREFCNT_inc_simple
+ SvREFCNT_inc_simple_NN
+ SvREFCNT_inc_simple_void
+ SvREFCNT_inc_simple_void_NN
+ SvREFCNT_inc_void
+ SvREFCNT_inc_void_NN
SvRV_set
SvSTASH_set
SvUV
MULTICALL
POP_MULTICALL
PUSH_MULTICALL
- PoisonNew
- PoisonWith
- SvREFCNT_inc_NN
- SvREFCNT_inc_simple
- SvREFCNT_inc_simple_NN
- SvREFCNT_inc_simple_void
- SvREFCNT_inc_void
- SvREFCNT_inc_void_NN
gv_name_set
my_vsnprintf
newXS_flags
use strict;
use vars qw($VERSION @ISA $data);
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
@ISA = qw(DynaLoader);
|>=head1 SEE ALSO
|>
|>See L<Devel::PPPort>.
-
-=cut
+|>
+|>=cut
use strict;
PERL_UNUSED_VAR|5.007002||p
PERL_UQUAD_MAX|5.004000||p
PERL_UQUAD_MIN|5.004000||p
+PERL_USE_GCC_BRACE_GROUPS|||p
PERL_USHORT_MAX|5.004000||p
PERL_USHORT_MIN|5.004000||p
PERL_VERSION|5.006000||p
PUTBACK|||
PerlIO_clearerr||5.007003|
PerlIO_close||5.007003|
+PerlIO_context_layers|||
PerlIO_eof||5.007003|
PerlIO_error||5.007003|
PerlIO_fileno||5.007003|
PerlIO_write||5.007003|
Perl_warner_nocontext|5.006000||p
Perl_warner|5.006000||p
-PoisonNew||5.009004|
-PoisonWith||5.009004|
+PoisonFree|5.009004||p
+PoisonNew|5.009004||p
+PoisonWith|5.009004||p
Poison|5.008000||p
RETVAL|||n
Renewc|||
SvPVx|||
SvPV|||
SvREFCNT_dec|||
-SvREFCNT_inc_NN||5.009004|
-SvREFCNT_inc_simple_NN||5.009004|
-SvREFCNT_inc_simple_void||5.009004|
-SvREFCNT_inc_simple||5.009004|
-SvREFCNT_inc_void_NN||5.009004|
-SvREFCNT_inc_void||5.009004|
-SvREFCNT_inc|||
+SvREFCNT_inc_NN|5.009004||p
+SvREFCNT_inc_simple_NN|5.009004||p
+SvREFCNT_inc_simple_void_NN|5.009004||p
+SvREFCNT_inc_simple_void|5.009004||p
+SvREFCNT_inc_simple|5.009004||p
+SvREFCNT_inc_void_NN|5.009004||p
+SvREFCNT_inc_void|5.009004||p
+SvREFCNT_inc|||p
SvREFCNT|||
SvROK_off|||
SvROK_on|||
reentrant_size|||
ref_array_or_hash|||
refcounted_he_chain_2hv|||
+refcounted_he_fetch|||
refcounted_he_free|||
refcounted_he_new|||
+refcounted_he_value|||
refkids|||
refto|||
ref||5.009003|
#endif
#endif
+#ifndef PoisonWith
+# define PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
+#endif
+
+#ifndef PoisonNew
+# define PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
+#endif
+
+#ifndef PoisonFree
+# define PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
+#endif
+
#ifndef Poison
-# define Poison(d,n,t) (void)memset((char*)(d), 0xAB, (n) * sizeof(t))
+# define Poison(d,n,t) PoisonFree(d,n,t)
#endif
#ifndef Newx
# define Newx(v,n,t) New(0,v,n,t)
# define EXTERN_C extern
#endif
-#ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
-# if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC)
+#if defined(PERL_GCC_PEDANTIC)
+# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
# endif
#endif
+#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
+# ifndef PERL_USE_GCC_BRACE_GROUPS
+# define PERL_USE_GCC_BRACE_GROUPS
+# endif
+#endif
+
#undef STMT_START
#undef STMT_END
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
+#ifdef PERL_USE_GCC_BRACE_GROUPS
# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
# define STMT_END )
#else
# endif
#endif
+#ifndef SvREFCNT_inc
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ if (_sv) \
+ (SvREFCNT(_sv))++; \
+ _sv; \
+ })
+# else
+# define SvREFCNT_inc(sv) \
+ ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_simple
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_simple(sv) \
+ ({ \
+ if (sv) \
+ (SvREFCNT(sv))++; \
+ (SV *)(sv); \
+ })
+# else
+# define SvREFCNT_inc_simple(sv) \
+ ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_NN
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_NN(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ SvREFCNT(_sv)++; \
+ _sv; \
+ })
+# else
+# define SvREFCNT_inc_NN(sv) \
+ (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_void
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_void(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ if (_sv) \
+ (void)(SvREFCNT(_sv)++); \
+ })
+# else
+# define SvREFCNT_inc_void(sv) \
+ (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
+# endif
+#endif
+#ifndef SvREFCNT_inc_simple_void
+# define SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
+#endif
+
+#ifndef SvREFCNT_inc_simple_NN
+# define SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
+#endif
+
+#ifndef SvREFCNT_inc_void_NN
+# define SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
+#endif
+
+#ifndef SvREFCNT_inc_simple_void_NN
+# define SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
+#endif
+
#ifndef SvPV_nolen
#if defined(NEED_sv_2pv_nolen)
#endif
#ifndef hv_fetchs
-# define hv_fetchs(hv,key,lval) hv_fetch(hv, key "", sizeof(key) - 1, lval)
+# define hv_fetchs(hv, key, lval) hv_fetch(hv, key "", sizeof(key) - 1, lval)
#endif
#ifndef hv_stores
-# define hv_stores(hv,key,val,hash) hv_store(hv, key "", sizeof(key) - 1, val, hash)
+# define hv_stores(hv, key, val) hv_store(hv, key "", sizeof(key) - 1, val, 0)
#endif
#ifndef SvGETMAGIC
# define SvGETMAGIC(x) STMT_START { if (SvGMAGICAL(x)) mg_get(x); } STMT_END
SV *hv
SV *sv
PPCODE:
- hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc(sv), 0);
+ hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc(sv));
##----------------------------------------------------------------------
## XSUBs from parts/inc/snprintf
RETVAL
##----------------------------------------------------------------------
+## XSUBs from parts/inc/SvREFCNT
+##----------------------------------------------------------------------
+
+void
+SvREFCNT()
+ PREINIT:
+ SV *sv, *svr;
+ PPCODE:
+ sv = newSV(0);
+ XPUSHs(newSViv(SvREFCNT(sv) == 1));
+ svr = SvREFCNT_inc(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 2));
+ svr = SvREFCNT_inc_simple(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 3));
+ svr = SvREFCNT_inc_NN(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 4));
+ svr = SvREFCNT_inc_simple_NN(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 5));
+ SvREFCNT_inc_void(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 6));
+ SvREFCNT_inc_simple_void(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 7));
+ SvREFCNT_inc_void_NN(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 8));
+ SvREFCNT_inc_simple_void_NN(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 9));
+ while (SvREFCNT(sv) > 1)
+ SvREFCNT_dec(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 1));
+ SvREFCNT_dec(sv);
+ XSRETURN(14);
+
+##----------------------------------------------------------------------
## XSUBs from parts/inc/threads
##----------------------------------------------------------------------
#
################################################################################
#
-# $Revision: 42 $
+# $Revision: 43 $
# $Author: mhx $
-# $Date: 2006/05/18 23:13:47 +0200 $
+# $Date: 2006/05/22 00:51:20 +0200 $
#
################################################################################
#
#
################################################################################
#
-# $Revision: 42 $
+# $Revision: 43 $
# $Author: mhx $
-# $Date: 2006/05/18 23:13:47 +0200 $
+# $Date: 2006/05/22 00:51:20 +0200 $
#
################################################################################
#
use strict;
use vars qw($VERSION @ISA $data);
-$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+$VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
@ISA = qw(DynaLoader);
%include format
+%include SvREFCNT
+
%include SvPV
%include Sv_set
TODO:
-* see if we can add more stuff from recent perls
-
* see if we can implement sv_catpvf() for < 5.004
* add hv_stores() to blead
-* Andy's SvREFCNT_inc patches?
-
* MULTICALL ?
* improve apicheck (things like utf8_mg_pos_init() are
#
################################################################################
#
-# $Revision: 21 $
+# $Revision: 22 $
# $Author: mhx $
-# $Date: 2006/01/14 18:07:56 +0100 $
+# $Date: 2006/05/21 23:15:21 +0200 $
#
################################################################################
#
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..__PLAN__\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (__PLAN__) {
+ load();
plan(tests => __PLAN__);
}
}
Am|SV*|SvREFCNT_inc_NN|SV* sv
Am|SV*|SvREFCNT_inc_simple_NN|SV* sv
Am|SV*|SvREFCNT_inc_simple|SV* sv
+Am|SV*|SvREFCNT_inc_simple_void_NN|SV* sv
Am|SV*|SvREFCNT_inc_simple_void|SV* sv
Am|SV*|SvREFCNT_inc|SV* sv
Am|SV*|SvREFCNT_inc_void_NN|SV* sv
Am|void|Newxc|void* ptr|int nitems|type|cast
Am|void|Newx|void* ptr|int nitems|type
Am|void|Newxz|void* ptr|int nitems|type
+Am|void|PoisonFree|void* dest|int nitems|type
Am|void|PoisonNew|void* dest|int nitems|type
Am|void|Poison|void* dest|int nitems|type
Am|void|PoisonWith|void* dest|int nitems|type|U8 byte
MULTICALL # E
POP_MULTICALL # E
PUSH_MULTICALL # E
+PoisonFree # E
PoisonNew # E
PoisonWith # E
SvREFCNT_inc_NN # E
SvREFCNT_inc_simple # E
SvREFCNT_inc_simple_NN # E
SvREFCNT_inc_simple_void # E
+SvREFCNT_inc_simple_void_NN # E
SvREFCNT_inc_void # E
SvREFCNT_inc_void_NN # E
SvSTASH_set # E
Ap |void |hv_ksplit |NN HV* hv|IV newmax
Apdbm |void |hv_magic |NN HV* hv|NULLOK GV* gv|int how
dpoM |HV * |refcounted_he_chain_2hv|NULLOK const struct refcounted_he *c
+XEpoM |SV * |refcounted_he_fetch|NN const struct refcounted_he *chain \
+ |NULLOK SV *keysv|NULLOK const char *key \
+ |STRLEN klen, int flags, U32 hash
dpoM |void |refcounted_he_free|NULLOK struct refcounted_he *he
dpoM |struct refcounted_he *|refcounted_he_new \
|NULLOK struct refcounted_he *const parent \
sM |HE* |hv_fetch_common|NULLOK HV* tb|NULLOK SV* keysv|NULLOK const char* key \
|STRLEN klen|int flags|int action|NULLOK SV* val|U32 hash
sM |void |clear_placeholders |NN HV* hb|U32 items
+sM |SV * |refcounted_he_value |NN const struct refcounted_he *he
#endif
#if defined(PERL_IN_MG_C) || defined(PERL_DECL_PROT)
pMXE |SV* |sv_setsv_cow |NN SV* dsv|NN SV* ssv
#endif
+Aop |const char *|PerlIO_context_layers|NULLOK const char *mode
+
#if defined(USE_PERLIO) && !defined(USE_SFIO)
Ap |int |PerlIO_close |NULLOK PerlIO *f
Ap |int |PerlIO_fill |NULLOK PerlIO *f
--- /dev/null
+################################################################################
+##
+## $Revision: 1 $
+## $Author: mhx $
+## $Date: 2006/05/22 00:51:52 +0200 $
+##
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2006, 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
+
+SvREFCNT_inc
+SvREFCNT_inc_simple
+SvREFCNT_inc_NN
+SvREFCNT_inc_void
+__UNDEFINED__
+
+=implementation
+
+#ifndef SvREFCNT_inc
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ if (_sv) \
+ (SvREFCNT(_sv))++; \
+ _sv; \
+ })
+# else
+# define SvREFCNT_inc(sv) \
+ ((PL_Sv=(SV*)(sv)) ? (++(SvREFCNT(PL_Sv)),PL_Sv) : NULL)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_simple
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_simple(sv) \
+ ({ \
+ if (sv) \
+ (SvREFCNT(sv))++; \
+ (SV *)(sv); \
+ })
+# else
+# define SvREFCNT_inc_simple(sv) \
+ ((sv) ? (SvREFCNT(sv)++,(SV*)(sv)) : NULL)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_NN
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_NN(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ SvREFCNT(_sv)++; \
+ _sv; \
+ })
+# else
+# define SvREFCNT_inc_NN(sv) \
+ (PL_Sv=(SV*)(sv),++(SvREFCNT(PL_Sv)),PL_Sv)
+# endif
+#endif
+
+#ifndef SvREFCNT_inc_void
+# ifdef PERL_USE_GCC_BRACE_GROUPS
+# define SvREFCNT_inc_void(sv) \
+ ({ \
+ SV * const _sv = (SV*)(sv); \
+ if (_sv) \
+ (void)(SvREFCNT(_sv)++); \
+ })
+# else
+# define SvREFCNT_inc_void(sv) \
+ (void)((PL_Sv=(SV*)(sv)) ? ++(SvREFCNT(PL_Sv)) : 0)
+# endif
+#endif
+
+__UNDEFINED__ SvREFCNT_inc_simple_void(sv) STMT_START { if (sv) SvREFCNT(sv)++; } STMT_END
+__UNDEFINED__ SvREFCNT_inc_simple_NN(sv) (++SvREFCNT(sv), (SV*)(sv))
+__UNDEFINED__ SvREFCNT_inc_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
+__UNDEFINED__ SvREFCNT_inc_simple_void_NN(sv) (void)(++SvREFCNT((SV*)(sv)))
+
+=xsubs
+
+void
+SvREFCNT()
+ PREINIT:
+ SV *sv, *svr;
+ PPCODE:
+ sv = newSV(0);
+ XPUSHs(newSViv(SvREFCNT(sv) == 1));
+ svr = SvREFCNT_inc(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 2));
+ svr = SvREFCNT_inc_simple(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 3));
+ svr = SvREFCNT_inc_NN(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 4));
+ svr = SvREFCNT_inc_simple_NN(sv);
+ XPUSHs(newSViv(sv == svr));
+ XPUSHs(newSViv(SvREFCNT(sv) == 5));
+ SvREFCNT_inc_void(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 6));
+ SvREFCNT_inc_simple_void(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 7));
+ SvREFCNT_inc_void_NN(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 8));
+ SvREFCNT_inc_simple_void_NN(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 9));
+ while (SvREFCNT(sv) > 1)
+ SvREFCNT_dec(sv);
+ XPUSHs(newSViv(SvREFCNT(sv) == 1));
+ SvREFCNT_dec(sv);
+ XSRETURN(14);
+
+=tests plan => 14
+
+for (Devel::PPPort::SvREFCNT()) {
+ ok(defined $_ and $_);
+}
+
################################################################################
##
-## $Revision: 1 $
+## $Revision: 2 $
## $Author: mhx $
-## $Date: 2005/10/30 11:26:42 +0100 $
+## $Date: 2006/05/22 00:50:25 +0200 $
##
################################################################################
##
-## Version 3.x, Copyright (C) 2004-2005, Marcus Holland-Moritz.
+## Version 3.x, Copyright (C) 2004-2006, Marcus Holland-Moritz.
## Version 2.x, Copyright (C) 2001, Paul Marquess.
## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
##
__UNDEFINED__ ZeroD(d,n,t) ((void)memzero((char*)(d), (n) * sizeof(t)), d)
#endif
-__UNDEFINED__ Poison(d,n,t) (void)memset((char*)(d), 0xAB, (n) * sizeof(t))
+__UNDEFINED__ PoisonWith(d,n,t,b) (void)memset((char*)(d), (U8)(b), (n) * sizeof(t))
+__UNDEFINED__ PoisonNew(d,n,t) PoisonWith(d,n,t,0xAB)
+__UNDEFINED__ PoisonFree(d,n,t) PoisonWith(d,n,t,0xEF)
+__UNDEFINED__ Poison(d,n,t) PoisonFree(d,n,t)
__UNDEFINED__ Newx(v,n,t) New(0,v,n,t)
__UNDEFINED__ Newxc(v,n,t,c) Newc(0,v,n,t,c)
################################################################################
##
-## $Revision: 35 $
+## $Revision: 36 $
## $Author: mhx $
-## $Date: 2006/05/19 23:57:26 +0200 $
+## $Date: 2006/05/22 00:51:01 +0200 $
##
################################################################################
##
PERL_UNUSED_VAR
PERL_UNUSED_CONTEXT
PERL_GCC_BRACE_GROUPS_FORBIDDEN
+PERL_USE_GCC_BRACE_GROUPS
NVTYPE
INT2PTR
PTRV
# define EXTERN_C extern
#endif
-#ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
-# if defined(__STRICT_ANSI__) && defined(PERL_GCC_PEDANTIC)
+#if defined(PERL_GCC_PEDANTIC)
+# ifndef PERL_GCC_BRACE_GROUPS_FORBIDDEN
# define PERL_GCC_BRACE_GROUPS_FORBIDDEN
# endif
#endif
+#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
+# ifndef PERL_USE_GCC_BRACE_GROUPS
+# define PERL_USE_GCC_BRACE_GROUPS
+# endif
+#endif
+
#undef STMT_START
#undef STMT_END
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__cplusplus)
+#ifdef PERL_USE_GCC_BRACE_GROUPS
# define STMT_START (void)( /* gcc supports ``({ STATEMENTS; })'' */
# define STMT_END )
#else
--- /dev/null
+################################################################################
+##
+## $Revision: 2 $
+## $Author: mhx $
+## $Date: 2006/05/22 00:50:40 +0200 $
+##
+################################################################################
+##
+## Version 3.x, Copyright (C) 2004-2006, 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.
+##
+################################################################################
+
+=tests plan => 0
+
+my @pods = qw( HACKERS PPPort.pm ppport.h );
+
+# Try loading Test::Pod
+eval q{
+ use Test::Pod;
+ $Test::Pod::VERSION >= 0.95
+ or die "Test::Pod version only $Test::Pod::VERSION";
+ import Test::Pod tests => scalar @pods;
+};
+
+my $TP = $@ eq '';
+
+unless ($TP) {
+ load();
+ plan(tests => scalar @pods);
+}
+
+for (@pods) {
+ print "# checking $_\n";
+ if ($TP) {
+ pod_file_ok($_);
+ }
+ else {
+ skip("skip: Test::Pod >= 0.95 required", 0);
+ }
+}
+
################################################################################
##
-## $Revision: 31 $
+## $Revision: 32 $
## $Author: mhx $
-## $Date: 2006/01/14 18:08:02 +0100 $
+## $Date: 2006/05/21 23:14:16 +0200 $
##
################################################################################
##
=implementation
-=cut
-
use strict;
my %opt = (
################################################################################
##
-## $Revision: 25 $
+## $Revision: 26 $
## $Author: mhx $
-## $Date: 2006/01/14 18:08:00 +0100 $
+## $Date: 2006/05/21 23:14:18 +0200 $
##
################################################################################
##
See L<Devel::PPPort>.
+=cut
+
################################################################################
##
-## $Revision: 2 $
+## $Revision: 3 $
## $Author: mhx $
-## $Date: 2006/05/19 23:00:18 +0200 $
+## $Date: 2006/05/22 12:27:50 +0200 $
##
################################################################################
##
__UNDEFINED__ newSVpvs(str) newSVpvn(str "", sizeof(str) - 1)
__UNDEFINED__ sv_catpvs(sv, str) sv_catpvn(sv, str "", sizeof(str) - 1)
__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,hash) hv_store(hv, key "", sizeof(key) - 1, val, hash)
+__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)
=xsubs
SV *hv
SV *sv
PPCODE:
- hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc(sv), 0);
+ hv_stores((HV *) SvRV(hv), "hv_stores", SvREFCNT_inc(sv));
=tests plan => 7
MULTICALL # E
POP_MULTICALL # E
PUSH_MULTICALL # E
-PoisonNew # E
-PoisonWith # E
-SvREFCNT_inc_NN # E
-SvREFCNT_inc_simple # E
-SvREFCNT_inc_simple_NN # E
-SvREFCNT_inc_simple_void # E
-SvREFCNT_inc_void # E
-SvREFCNT_inc_void_NN # E
gv_name_set # U
my_vsnprintf # U
newXS_flags # E
#
################################################################################
#
-# $Revision: 9 $
+# $Revision: 11 $
# $Author: mhx $
-# $Date: 2006/01/14 18:07:57 +0100 $
+# $Date: 2006/05/22 01:57:33 +0200 $
#
################################################################################
#
use ExtUtils::MakeMaker;
use Getopt::Long;
use Pod::Usage;
+use File::Find;
use List::Util qw(max);
use Config;
-my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_01 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
+my $VERSION = do { my @r = '$Snapshot: /Devel-PPPort/3.08_02 $' =~ /(\d+\.\d+(?:_\d+)?)/; @r ? $r[0] : '9.99' };
$| = 1;
my $verbose = 0;
my %OPT = (
verbose => 0,
make => $Config{make} || 'make',
+ min => '5.000',
);
-GetOptions(\%OPT, qw(verbose make=s mmargs=s@)) or pod2usage(2);
+GetOptions(\%OPT, qw(verbose make=s min=s mmargs=s@)) or pod2usage(2);
$OPT{mmargs} = [''] unless exists $OPT{mmargs};
+$OPT{min} = parse_version($OPT{min}) - 1e-10;
-my @GoodPerls = @ARGV ? @ARGV : FindPerls();
+my @GoodPerls = sort { eval { parse_version($a) <=> parse_version($b) } or $a cmp $b }
+ grep { my $v = eval { parse_version($_) }; $@ or $v >= $OPT{min} }
+ @ARGV ? SearchPerls(@ARGV) : FindPerls();
my $maxlen = max(map length, @GoodPerls) + 3;
my $mmalen = max(map length, @{$OPT{mmargs}});
$maxlen += $mmalen+3 if $mmalen > 0;
runit("$^X Makefile.PL") && runit("$MAKE realclean")
or die "Cannot run $^X Makefile.PL && $MAKE realclean\n";
+print "Testing ", scalar @GoodPerls, " versions/configurations...\n\n";
+
for my $perl (@GoodPerls) {
for my $mm (@{$OPT{mmargs}}) {
my $config = $mm =~ /\S+/ ? " ($mm)" : '';
}
}
-if ($verbose && @bad) {
- print "\nFailed with:\n", map " $_\n", @bad;
+if (@bad) {
+ print "\nFailed with:\n";
+ for my $fail (@bad) {
+ my($perl, $mm) = @$fail;
+ my $config = $mm =~ /\S+/ ? " ($mm)" : '';
+ print " $perl$config\n";
+ }
}
+
print "\nPassed with ", scalar @good, " of $total versions/configurations.\n\n";
exit scalar @bad;
return @GoodPerls;
}
+sub SearchPerls
+{
+ my @args = @_;
+ my @perls;
+
+ for my $arg (@args) {
+ if (-d $arg) {
+ my @found;
+ print "Searching for Perl binaries in '$arg'...\n";
+ find(sub {
+ if ($File::Find::name =~ m!bin/perl5\.!) {
+ eval { parse_version($File::Find::name) };
+ $@ or push @found, $File::Find::name;
+ }
+ }, $arg);
+ printf "Found %d Perl binar%s in '%s'.\n\n", scalar @found, @found == 1 ? 'y' : 'ies', $arg;
+ push @perls, @found;
+ }
+ else {
+ push @perls, $arg;
+ }
+ }
+
+ return @perls;
+}
+
+sub parse_version
+{
+ my $ver = shift;
+
+ $ver = $1 if $ver =~ /perl(5\.[\d\._]+)/;
+
+ if ($ver =~ /^(\d+)\.(\d+)\.(\d+)$/) {
+ return $1 + 1e-3*$2 + 1e-6*$3;
+ }
+ elsif ($ver =~ /^\d+\.[\d_]+$/) {
+ $ver =~ s/_//g;
+ return $ver;
+ }
+
+ die "cannot parse version '$ver'\n";
+}
+
package NoSTDOUT;
use Tie::Handle;
soak [options] [perl ...]
--make=program override name of make program ($Config{make})
+ --min=version use at least this version of perl
--mmargs=options pass options to Makefile.PL (multiple --mmargs possible)
--verbose be verbose
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..3\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (3) {
+ load();
plan(tests => 3);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..2\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (2) {
+ load();
plan(tests => 2);
}
}
--- /dev/null
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/SvREFCNT instead.
+#
+################################################################################
+
+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 (14) {
+ load();
+ plan(tests => 14);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+for (Devel::PPPort::SvREFCNT()) {
+ ok(defined $_ and $_);
+}
+
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..5\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (5) {
+ load();
plan(tests => 5);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..44\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (44) {
+ load();
plan(tests => 44);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..2\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (2) {
+ load();
plan(tests => 2);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..7\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (7) {
+ load();
plan(tests => 7);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..10\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (10) {
+ load();
plan(tests => 10);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..4\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (4) {
+ load();
plan(tests => 4);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..8\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (8) {
+ load();
plan(tests => 8);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..13\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (13) {
+ load();
plan(tests => 13);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..1\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (1) {
+ load();
plan(tests => 1);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..42\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (42) {
+ load();
plan(tests => 42);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..3\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (3) {
+ load();
plan(tests => 3);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..2\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (2) {
+ load();
plan(tests => 2);
}
}
--- /dev/null
+################################################################################
+#
+# !!!!! Do NOT edit this file directly! !!!!!
+#
+# Edit mktests.PL and/or parts/inc/podtest instead.
+#
+################################################################################
+
+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 (0) {
+ load();
+ plan(tests => 0);
+ }
+}
+
+use Devel::PPPort;
+use strict;
+$^W = 1;
+
+my @pods = qw( HACKERS PPPort.pm ppport.h );
+
+# Try loading Test::Pod
+eval q{
+ use Test::Pod;
+ $Test::Pod::VERSION >= 0.95
+ or die "Test::Pod version only $Test::Pod::VERSION";
+ import Test::Pod tests => scalar @pods;
+};
+
+my $TP = $@ eq '';
+
+unless ($TP) {
+ load();
+ plan(tests => scalar @pods);
+}
+
+for (@pods) {
+ print "# checking $_\n";
+ if ($TP) {
+ pod_file_ok($_);
+ }
+ else {
+ skip("skip: Test::Pod >= 0.95 required", 0);
+ }
+}
+
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..202\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (202) {
+ load();
plan(tests => 202);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..7\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (7) {
+ load();
plan(tests => 7);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..2\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (2) {
+ load();
plan(tests => 2);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..9\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (9) {
+ load();
plan(tests => 9);
}
}
{
my $__ntest;
+ my $__total;
+
+ sub plan {
+ @_ == 2 or die "usage: plan(tests => count)";
+ my $what = shift;
+ $what eq 'tests' or die "cannot plan anything but tests";
+ $__total = shift;
+ defined $__total && $__total > 0 or die "need a positive number of tests";
+ print "1..$__total\n";
+ }
+
+ sub skip {
+ my $reason = shift;
+ ++$__ntest;
+ print "ok $__ntest # skip: $reason\n"
+ }
sub ok ($;$$) {
local($\,$,);
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..2\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (2) {
+ load();
plan(tests => 2);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..10\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (10) {
+ load();
plan(tests => 10);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..1\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (1) {
+ load();
plan(tests => 1);
}
}
unshift @INC, 't';
}
- eval "use Test";
- if ($@) {
- require 'testutil.pl';
- print "1..5\n";
+ sub load {
+ eval "use Test";
+ require 'testutil.pl' if $@;
}
- else {
+
+ if (5) {
+ load();
plan(tests => 5);
}
}