X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.h;h=cc7edb9049f8ad8794fed0b70390c3d405fbd200;hb=842c41230043ce99d4bf7b2c79aed85ce2908e89;hp=f88f139a0e602e248061a258088e57120109ff16;hpb=6e1287864cd02fb6f429f12a995e1c08e03572b9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.h b/sv.h index f88f139..cc7edb9 100644 --- a/sv.h +++ b/sv.h @@ -416,12 +416,9 @@ union _xnvu { union _xivu { IV xivu_iv; /* integer value */ - /* xpvfm: lines */ UV xivu_uv; - void * xivu_p1; - I32 xivu_i32; + I32 xivu_i32; /* BmUSEFUL */ HEK * xivu_namehek; /* xpvlv, xpvgv: GvNAME */ - HV * xivu_hv; /* regexp: paren_names */ }; union _xmgu { @@ -484,7 +481,6 @@ struct xpvgv { typedef U16 cv_flags_t; #define _XPVCV_COMMON \ - union _xivu xiv_u; \ HV * xcv_stash; \ union { \ OP * xcv_start; \ @@ -506,6 +502,7 @@ typedef U16 cv_flags_t; struct xpvfm { _XPV_HEAD; _XPVCV_COMMON; + IV xfm_lines; }; #define _XPVIO_TAIL \ @@ -1166,6 +1163,9 @@ the scalar's value cannot change unless written to. #define SvIV_please(sv) \ STMT_START {if (!SvIOKp(sv) && (SvNOK(sv) || SvPOK(sv))) \ (void) SvIV(sv); } STMT_END +#define SvIV_please_nomg(sv) \ + STMT_START {if (!SvIOKp(sv) && (SvNOK(sv) || SvPOK(sv))) \ + (void) SvIV_nomg(sv); } STMT_END #define SvIV_set(sv, val) \ STMT_START { assert(SvTYPE(sv) == SVt_IV || SvTYPE(sv) >= SVt_PVIV); \ assert(SvTYPE(sv) != SVt_PVAV); \ @@ -1304,7 +1304,7 @@ the scalar's value cannot change unless written to. #endif -#define FmLINES(sv) ((XPVFM*) SvANY(sv))->xiv_u.xivu_iv +#define FmLINES(sv) ((XPVFM*) SvANY(sv))->xfm_lines #define LvTYPE(sv) ((XPVLV*) SvANY(sv))->xlv_type #define LvTARG(sv) ((XPVLV*) SvANY(sv))->xlv_targ @@ -1422,6 +1422,9 @@ otherwise use the more efficient C. Coerce the given SV to a double and return it. See C for a version which guarantees to evaluate sv only once. +=for apidoc Am|NV|SvNV_nomg|SV* sv +Like C but doesn't process magic. + =for apidoc Am|NV|SvNVx|SV* sv Coerces the given SV to a double and returns it. Guarantees to evaluate C only once. Only use this if C is an expression with side effects, @@ -1513,6 +1516,7 @@ Like sv_utf8_upgrade, but doesn't do magic on C #define SvIV_nomg(sv) (SvIOK(sv) ? SvIVX(sv) : sv_2iv_flags(sv, 0)) #define SvUV_nomg(sv) (SvIOK(sv) ? SvUVX(sv) : sv_2uv_flags(sv, 0)) +#define SvNV_nomg(sv) (SvNOK(sv) ? SvNVX(sv) : sv_2nv_flags(sv, 0)) /* ----*/