X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pp.h;h=029583a09b3f290b54a8aa316b8d2e12e12443cc;hb=89491803eada141bfe112702c189849c457eac87;hp=bdc0b1a6c1c98e78d7dfc3128ed40c8302cea654;hpb=cb50131aab68ac6dda048612c6e853b8cb08701e;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pp.h b/pp.h index bdc0b1a..029583a 100644 --- a/pp.h +++ b/pp.h @@ -143,11 +143,11 @@ Pops a long off the stack. /* =for apidoc Am|void|EXTEND|SP|int nitems Used to extend the argument stack for an XSUB's return values. Once -used, guarrantees that there is room for at least C to be pushed +used, guarantees that there is room for at least C to be pushed onto the stack. =for apidoc Am|void|PUSHs|SV* sv -Push an SV onto the stack. The stack must have room for this element. +Push an SV onto the stack. The stack must have room for this element. Does not handle 'set' magic. See C. =for apidoc Am|void|PUSHp|char* str|STRLEN len @@ -185,7 +185,7 @@ Push an integer onto the stack, extending the stack if necessary. Handles 'set' magic. See C. =for apidoc Am|void|XPUSHu|UV uv -Push an unsigned integer onto the stack, extending the stack if necessary. +Push an unsigned integer onto the stack, extending the stack if necessary. See C. =cut @@ -342,10 +342,13 @@ See C. { dTARGETSTACKED; \ { dSP; tryAMAGICunW(meth,FORCE_SETs,shift,RETURN);}}} -#define setAGAIN(ref) sv = arg = ref; \ - if (!SvROK(ref)) \ +#define setAGAIN(ref) sv = ref; \ + if (!SvROK(ref)) \ Perl_croak(aTHX_ "Overloaded dereference did not return a reference"); \ - goto am_again; + if (ref != arg && SvRV(ref) != SvRV(arg)) { \ + arg = ref; \ + goto am_again; \ + } #define tryAMAGICunDEREF(meth) tryAMAGICunW(meth,setAGAIN,0,(void)0)