X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/1a436fbe3c7e36cfac949d9e21c6191cb2a33362..5927ddccd733e5d8252ce3866c027c042d2f98aa:/sv.h diff --git a/sv.h b/sv.h index ad7046a..1c72242 100644 --- a/sv.h +++ b/sv.h @@ -1649,7 +1649,7 @@ Like C but doesn't process magic. =for apidoc Am|void|sv_catsv_nomg|SV* dsv|SV* ssv Like C but doesn't process magic. -=for apidoc Amdb|STRLEN|sv_utf8_upgrade_nomg|NN SV *sv +=for apidoc Amdb|STRLEN|sv_utf8_upgrade_nomg|SV *sv Like C, but doesn't do magic on C. @@ -1775,7 +1775,7 @@ Like C, but doesn't do magic on C. : SvPOK(sv) \ ? SvPVXtrue(sv) \ : SvIOK(sv) \ - ? SvIVX(sv) \ + ? (SvIVX(sv) != 0 /* cast to bool */) \ : (SvROK(sv) && !( SvOBJECT(SvRV(sv)) \ && HvAMAGIC(SvSTASH(SvRV(sv))))) \ ? TRUE \ @@ -2146,6 +2146,10 @@ See also C> and C>. assert (!SvIOKp(sv)); \ (SvFLAGS(sv) &= ~SVpgv_GP); \ } STMT_END +#ifdef PERL_CORE +# define isGV_or_RVCV(kadawp) \ + (isGV(kadawp) || (SvROK(kadawp) && SvTYPE(SvRV(kadawp)) == SVt_PVCV)) +#endif #define isREGEXP(sv) \ (SvTYPE(sv) == SVt_REGEXP \ || (SvFLAGS(sv) & (SVTYPEMASK|SVpgv_GP|SVf_FAKE)) \ @@ -2176,7 +2180,7 @@ struct clone_params { }; /* -=for apidoc Am|SV*|newSVpvn_utf8|NULLOK const char* s|STRLEN len|U32 utf8 +=for apidoc Am|SV*|newSVpvn_utf8|const char* s|STRLEN len|U32 utf8 Creates a new SV and copies a string (which may contain C (C<\0>) characters) into it. If C is true, calls @@ -2198,7 +2202,7 @@ Creates a new SV containing the pad name. #define newSVpadname(pn) newSVpvn_utf8(PadnamePV(pn), PadnameLEN(pn), TRUE) /* -=for apidoc Am|void|SvOOK_offset|NN SV*sv|STRLEN len +=for apidoc Am|void|SvOOK_offset|SV*sv|STRLEN len Reads into C the offset from C back to the true start of the allocated buffer, which will be non-zero if C has been used to