On Tue, Dec 05, 2000 at 09:30:11PM +0000, Nicholas Clark wrote: > Jarkko (or anyone else who might know) > > why did you use SvIVx rather than SvIV or SvIVX in your pp_add implementation? Phase of the moon. > What's the difference between these 3 (and SvIVXx)? So, 4... I must admit that I've never studied this in enough detail. But based on quick investigation by cpp, or by glaring at sv.h: SvIV(x) (((x)->sv_flags & 0x00010000) ? ((XPVIV*) (x)->sv_any)->xiv_iv : Perl_sv_2iv(thr, x)) SvIVx(x) Perl_sv_iv(thr, x) SvIVX(x) ((XPVIV*) (x)->sv_any)->xiv_iv SvIVXx(x) ((XPVIV*) (x)->sv_any)->xiv_iv So SvIV(x) is SvIOK(x) conditional SvIVX(x) or sv_2iv(), SvIVX(x) is direct peek at the iv field, and SvIVXx(x) is just an alias for SvIVX(x). > Would it be possible to add > > --- ../bleadperl-NV/pp.h Sat Sep 2 17:52:58 2000 > +++ pp.h Mon Dec 4 19:29:51 2000 > @@ -126,6 +126,7 @@ > #endif > > #define TOPs (*sp) > +#define TOPm1s (*(sp-1)) I'll add that. Or maybe PEEKs(i)? (And POKEs(i,sv)? :-) > #define TOPp (SvPV(TOPs, PL_na)) /* deprecated */ > #define TOPpx (SvPV(TOPs, n_a)) > #define TOPn (SvNV(TOPs)) > > to the bleadperl as it would make things easier for getting 64 bit > preservation without (I'm pretty sure) breaking anything for anyone > else? > > Nicholas Clark -- $jhi++; # http://www.iki.fi/jhi/ # There is this special biologist word we use for 'stable'. # It is 'dead'. -- Jack CohenThread Previous | Thread Next