diff options
author | Steffen Mueller <smueller@cpan.org> | 2010-04-18 17:51:19 +0200 |
---|---|---|
committer | Steffen Mueller <smueller@cpan.org> | 2010-04-20 22:46:05 +0200 |
commit | 4daffb2bd8ac01845985e3bfe0e23d10a1dab19c (patch) | |
tree | 0831989ab1a83e4f184cea256e2746ec35b11e1d /cpan/List-Util/ListUtil.xs | |
parent | 4db98c67157803f38c3920ded8b3708deb8accd5 (diff) | |
download | perl-4daffb2bd8ac01845985e3bfe0e23d10a1dab19c.tar.gz |
Upgrade Scalar-List-Utils to 1.23 from CPAN
Diffstat (limited to 'cpan/List-Util/ListUtil.xs')
-rw-r--r-- | cpan/List-Util/ListUtil.xs | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/cpan/List-Util/ListUtil.xs b/cpan/List-Util/ListUtil.xs index dfde039fb6..7da9b959d1 100644 --- a/cpan/List-Util/ListUtil.xs +++ b/cpan/List-Util/ListUtil.xs @@ -2,7 +2,7 @@ * This program is free software; you can redistribute it and/or * modify it under the same terms as Perl itself. */ - +#define PERL_NO_GET_CONTEXT /* we want efficiency */ #include <EXTERN.h> #include <perl.h> #include <XSUB.h> @@ -66,7 +66,7 @@ my_cxinc(pTHX) # ifndef SvTAINTED static bool -sv_tainted(SV *sv) +sv_tainted(pTHX_ SV *sv) { if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv)) { MAGIC *mg = mg_find(sv, 't'); @@ -77,7 +77,7 @@ sv_tainted(SV *sv) } # define SvTAINTED_on(sv) sv_magic((sv), Nullsv, 't', Nullch, 0) -# define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(sv)) +# define SvTAINTED(sv) (SvMAGICAL(sv) && sv_tainted(aTHX_ sv)) # endif # define PL_defgv defgv # define PL_op op @@ -126,10 +126,6 @@ sv_tainted(SV *sv) #define dNOOP extern int Perl___notused PERL_UNUSED_DECL #endif -#ifndef dVAR -#define dVAR dNOOP -#endif - #ifndef GvSVn # define GvSVn GvSV #endif @@ -282,7 +278,7 @@ reduce(block,...) PROTOTYPE: &@ CODE: { - dVAR; dMULTICALL; + dMULTICALL; SV *ret = sv_newmortal(); int index; GV *agv,*bgv,*gv; @@ -321,7 +317,7 @@ first(block,...) PROTOTYPE: &@ CODE: { - dVAR; dMULTICALL; + dMULTICALL; int index; GV *gv; HV *stash; @@ -359,7 +355,6 @@ shuffle(...) PROTOTYPE: @ CODE: { - dVAR; int index; #if (PERL_VERSION < 9) struct op dmy_op; @@ -438,7 +433,7 @@ CODE: { if (SvMAGICAL(sv)) mg_get(sv); - if(!sv_isobject(sv)) { + if(!(SvROK(sv) && SvOBJECT(SvRV(sv)))) { XSRETURN_UNDEF; } RETVAL = (char*)sv_reftype(SvRV(sv),TRUE); |