X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/c529f79d594c53d3968d464c57ac24a21137dd09..74294fdf14b31ab4091db1a29ace01e8859b6f98:/xsutils.c diff --git a/xsutils.c b/xsutils.c index ea717d9..b4161b0 100644 --- a/xsutils.c +++ b/xsutils.c @@ -23,7 +23,7 @@ void XS_attributes_bootstrap(pTHXo_ CV *cv); * * The various bootstrap definitions can take care of doing * package-specific newXS() calls. Since the layout of the - * bundled lib/*.pm files is in a version-specific directory, + * bundled *.pm files is in a version-specific directory, * version checks in these bootstrap calls are optional. */ @@ -35,10 +35,6 @@ Perl_boot_core_xsutils(pTHX) newXS("attributes::bootstrap", XS_attributes_bootstrap, file); } -#ifdef PERL_OBJECT -#define NO_XSLOCKS -#endif /* PERL_OBJECT */ - #include "XSUB.h" static int @@ -52,7 +48,7 @@ modify_SV_attributes(pTHXo_ SV *sv, SV **retlist, SV **attrlist, int numattrs) for (nret = 0 ; numattrs && (attr = *attrlist++); numattrs--) { name = SvPV(attr, len); - if (negated = (*name == '-')) { + if ((negated = (*name == '-'))) { name++; len--; } @@ -257,11 +253,9 @@ usage: rv = ST(0); ST(0) = TARG; - if (!SvOK(rv)) { - ST(0) = &PL_sv_no; - XSRETURN(1); - } - if (!SvROK(rv)) + if (SvGMAGICAL(rv)) + mg_get(rv); + if (!(SvOK(rv) && SvROK(rv))) goto usage; sv = SvRV(rv); sv_setpv(TARG, sv_reftype(sv, 0)); @@ -275,7 +269,6 @@ usage: XS(XS_attributes__warn_reserved) { dXSARGS; - SV *rv, *sv; #ifdef dXSTARGET dXSTARGET; #else