summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-04 12:28:54 +0000
committerMarcus Holland-Moritz <mhx-perl@gmx.net>2008-01-04 12:28:54 +0000
commit121b77126d4ab6098abde56a8c4175a9704d61b2 (patch)
tree343b2118389ad00a103dab3d230d3e31934fb52c /pp.h
parentae374e95f2465dddad54f12486ab8266e5ccbb5a (diff)
downloadperl-121b77126d4ab6098abde56a8c4175a9704d61b2.tar.gz
There's no need to handle 'set' magic in the mX?PUSH macros.
The macros all create new mortals using sv_newmortal(), and those cannot be magical. This is in contrary to the X?PUSH macros, which operate on TARG, which can be magical. With that in mind, mentioning whether or not mX?PUSH can handle 'set' magic doesn't make sense any longer. p4raw-id: //depot/perl@32824
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h60
1 files changed, 25 insertions, 35 deletions
diff --git a/pp.h b/pp.h
index c2cf6914ea..47a48d57f1 100644
--- a/pp.h
+++ b/pp.h
@@ -226,63 +226,53 @@ C<mPUSHu>.
=for apidoc Am|void|mPUSHs|SV* sv
Push an SV onto the stack and mortalizes the SV. The stack must have room
-for this element. Does not handle 'set' magic. Does not use C<TARG>.
-See also C<PUSHs> and C<mXPUSHs>.
+for this element. Does not use C<TARG>. See also C<PUSHs> and C<mXPUSHs>.
=for apidoc Am|void|PUSHmortal
Push a new mortal SV onto the stack. The stack must have room for this
-element. Does not handle 'set' magic. Does not use C<TARG>. See also
-C<PUSHs>, C<XPUSHmortal> and C<XPUSHs>.
+element. Does not use C<TARG>. See also C<PUSHs>, C<XPUSHmortal> and C<XPUSHs>.
=for apidoc Am|void|mPUSHp|char* str|STRLEN len
Push a string onto the stack. The stack must have room for this element.
-The C<len> indicates the length of the string. Handles 'set' magic. Does
-not use C<TARG>. See also C<PUSHp>, C<mXPUSHp> and C<XPUSHp>.
+The C<len> indicates the length of the string. Does not use C<TARG>.
+See also C<PUSHp>, C<mXPUSHp> and C<XPUSHp>.
=for apidoc Am|void|mPUSHn|NV nv
Push a double onto the stack. The stack must have room for this element.
-Handles 'set' magic. Does not use C<TARG>. See also C<PUSHn>, C<mXPUSHn>
-and C<XPUSHn>.
+Does not use C<TARG>. See also C<PUSHn>, C<mXPUSHn> and C<XPUSHn>.
=for apidoc Am|void|mPUSHi|IV iv
Push an integer onto the stack. The stack must have room for this element.
-Handles 'set' magic. Does not use C<TARG>. See also C<PUSHi>, C<mXPUSHi>
-and C<XPUSHi>.
+Does not use C<TARG>. See also C<PUSHi>, C<mXPUSHi> and C<XPUSHi>.
=for apidoc Am|void|mPUSHu|UV uv
Push an unsigned integer onto the stack. The stack must have room for this
-element. Handles 'set' magic. Does not use C<TARG>. See also C<PUSHu>,
-C<mXPUSHu> and C<XPUSHu>.
+element. Does not use C<TARG>. See also C<PUSHu>, C<mXPUSHu> and C<XPUSHu>.
=for apidoc Am|void|mXPUSHs|SV* sv
Push an SV onto the stack, extending the stack if necessary and mortalizes
-the SV. Does not handle 'set' magic. Does not use C<TARG>. See also
-C<XPUSHs> and C<mPUSHs>.
+the SV. Does not use C<TARG>. See also C<XPUSHs> and C<mPUSHs>.
=for apidoc Am|void|XPUSHmortal
-Push a new mortal SV onto the stack, extending the stack if necessary. Does
-not handle 'set' magic. Does not use C<TARG>. See also C<XPUSHs>,
-C<PUSHmortal> and C<PUSHs>.
+Push a new mortal SV onto the stack, extending the stack if necessary.
+Does not use C<TARG>. See also C<XPUSHs>, C<PUSHmortal> and C<PUSHs>.
=for apidoc Am|void|mXPUSHp|char* str|STRLEN len
Push a string onto the stack, extending the stack if necessary. The C<len>
-indicates the length of the string. Handles 'set' magic. Does not use
-C<TARG>. See also C<XPUSHp>, C<mPUSHp> and C<PUSHp>.
+indicates the length of the string. Does not use C<TARG>. See also C<XPUSHp>,
+C<mPUSHp> and C<PUSHp>.
=for apidoc Am|void|mXPUSHn|NV nv
-Push a double onto the stack, extending the stack if necessary. Handles
-'set' magic. Does not use C<TARG>. See also C<XPUSHn>, C<mPUSHn> and
-C<PUSHn>.
+Push a double onto the stack, extending the stack if necessary.
+Does not use C<TARG>. See also C<XPUSHn>, C<mPUSHn> and C<PUSHn>.
=for apidoc Am|void|mXPUSHi|IV iv
-Push an integer onto the stack, extending the stack if necessary. Handles
-'set' magic. Does not use C<TARG>. See also C<XPUSHi>, C<mPUSHi> and
-C<PUSHi>.
+Push an integer onto the stack, extending the stack if necessary.
+Does not use C<TARG>. See also C<XPUSHi>, C<mPUSHi> and C<PUSHi>.
=for apidoc Am|void|mXPUSHu|UV uv
Push an unsigned integer onto the stack, extending the stack if necessary.
-Handles 'set' magic. Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu>
-and C<PUSHu>.
+Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
=cut
*/
@@ -315,17 +305,17 @@ and C<PUSHu>.
#define mPUSHs(s) PUSHs(sv_2mortal(s))
#define PUSHmortal PUSHs(sv_newmortal())
-#define mPUSHp(p,l) sv_setpvn_mg(PUSHmortal, (p), (l))
-#define mPUSHn(n) sv_setnv_mg(PUSHmortal, (NV)(n))
-#define mPUSHi(i) sv_setiv_mg(PUSHmortal, (IV)(i))
-#define mPUSHu(u) sv_setuv_mg(PUSHmortal, (UV)(u))
+#define mPUSHp(p,l) sv_setpvn(PUSHmortal, (p), (l))
+#define mPUSHn(n) sv_setnv(PUSHmortal, (NV)(n))
+#define mPUSHi(i) sv_setiv(PUSHmortal, (IV)(i))
+#define mPUSHu(u) sv_setuv(PUSHmortal, (UV)(u))
#define mXPUSHs(s) XPUSHs(sv_2mortal(s))
#define XPUSHmortal XPUSHs(sv_newmortal())
-#define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn_mg(PUSHmortal, (p), (l)); } STMT_END
-#define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv_mg(PUSHmortal, (NV)(n)); } STMT_END
-#define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv_mg(PUSHmortal, (IV)(i)); } STMT_END
-#define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv_mg(PUSHmortal, (UV)(u)); } STMT_END
+#define mXPUSHp(p,l) STMT_START { EXTEND(sp,1); sv_setpvn(PUSHmortal, (p), (l)); } STMT_END
+#define mXPUSHn(n) STMT_START { EXTEND(sp,1); sv_setnv(PUSHmortal, (NV)(n)); } STMT_END
+#define mXPUSHi(i) STMT_START { EXTEND(sp,1); sv_setiv(PUSHmortal, (IV)(i)); } STMT_END
+#define mXPUSHu(u) STMT_START { EXTEND(sp,1); sv_setuv(PUSHmortal, (UV)(u)); } STMT_END
#define SETs(s) (*sp = s)
#define SETTARG STMT_START { SvSETMAGIC(TARG); SETs(TARG); } STMT_END