Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 266 lines (221 sloc) 8.8 kB
a0d0e21 perl 5.000
Larry Wall authored
1 /* pp.h
7907280 perl 5.0 alpha 2
Larry Wall authored
2 *
4eb8286 update copyright years
Gurusamy Sarathy authored
3 * Copyright (c) 1991-1999, Larry Wall
7907280 perl 5.0 alpha 2
Larry Wall authored
4 *
a0d0e21 perl 5.000
Larry Wall authored
5 * You may distribute under the terms of either the GNU General Public
6 * License or the Artistic License, as specified in the README file.
7907280 perl 5.0 alpha 2
Larry Wall authored
7 *
a0d0e21 perl 5.000
Larry Wall authored
8 */
7907280 perl 5.0 alpha 2
Larry Wall authored
9
1134378 Initial 3-way merge from (5.001m, thr1m, 5.003) plus fixups.
Malcolm Beattie authored
10 #ifdef USE_THREADS
11 #define ARGS thr
52e1cb5 @jhi AIX patch (including Configure support for {sched,pthread}_yield,
jhi authored
12 #define dARGS struct perl_thread *thr;
1134378 Initial 3-way merge from (5.001m, thr1m, 5.003) plus fixups.
Malcolm Beattie authored
13 #else
7907280 perl 5.0 alpha 2
Larry Wall authored
14 #define ARGS
15 #define dARGS
1134378 Initial 3-way merge from (5.001m, thr1m, 5.003) plus fixups.
Malcolm Beattie authored
16 #endif /* USE_THREADS */
22c35a8 phase 1 of somewhat major rearrangement of PERL_OBJECT stuff
Gurusamy Sarathy authored
17
cea2e8a more complete support for implicit thread/interpreter pointer,
Gurusamy Sarathy authored
18 #define PP(s) OP * Perl_##s(pTHX)
7907280 perl 5.0 alpha 2
Larry Wall authored
19
20 #define SP sp
21 #define MARK mark
22 #define TARG targ
23
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
24 #define PUSHMARK(p) if (++PL_markstack_ptr == PL_markstack_max) \
a0d0e21 perl 5.000
Larry Wall authored
25 markstack_grow(); \
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
26 *PL_markstack_ptr = (p) - PL_stack_base
a0d0e21 perl 5.000
Larry Wall authored
27
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
28 #define TOPMARK (*PL_markstack_ptr)
29 #define POPMARK (*PL_markstack_ptr--)
a0d0e21 perl 5.000
Larry Wall authored
30
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
31 #define djSP register SV **sp = PL_stack_sp
4e35701 Builds C++ Borland, MSVC++ (Win32) and GCC++ (Solaris)
Nick Ing-Simmons authored
32 #define dSP dTHR; djSP
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
33 #define dMARK register SV **mark = PL_stack_base + POPMARK
34 #define dORIGMARK I32 origmark = mark - PL_stack_base
35 #define SETORIGMARK origmark = mark - PL_stack_base
36 #define ORIGMARK (PL_stack_base + origmark)
7907280 perl 5.0 alpha 2
Larry Wall authored
37
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
38 #define SPAGAIN sp = PL_stack_sp
39 #define MSPAGAIN sp = PL_stack_sp; mark = ORIGMARK
7907280 perl 5.0 alpha 2
Larry Wall authored
40
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
41 #define GETTARGETSTACKED targ = (PL_op->op_flags & OPf_STACKED ? POPs : PAD_SV(PL_op->op_targ))
7907280 perl 5.0 alpha 2
Larry Wall authored
42 #define dTARGETSTACKED SV * GETTARGETSTACKED
43
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
44 #define GETTARGET targ = PAD_SV(PL_op->op_targ)
7907280 perl 5.0 alpha 2
Larry Wall authored
45 #define dTARGET SV * GETTARGET
46
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
47 #define GETATARGET targ = (PL_op->op_flags & OPf_STACKED ? sp[-1] : PAD_SV(PL_op->op_targ))
7907280 perl 5.0 alpha 2
Larry Wall authored
48 #define dATARGET SV * GETATARGET
49
50 #define dTARG SV *targ
51
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
52 #define NORMAL PL_op->op_next
cea2e8a more complete support for implicit thread/interpreter pointer,
Gurusamy Sarathy authored
53 #define DIE return Perl_die
7907280 perl 5.0 alpha 2
Larry Wall authored
54
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
55 #define PUTBACK PL_stack_sp = sp
7907280 perl 5.0 alpha 2
Larry Wall authored
56 #define RETURN return PUTBACK, NORMAL
57 #define RETURNOP(o) return PUTBACK, o
58 #define RETURNX(x) return x, PUTBACK, NORMAL
59
60 #define POPs (*sp--)
2d8e6c8 another threads reliability fix: serialize writes to thr->threadsv
Gurusamy Sarathy authored
61 #define POPp (SvPVx(POPs, PL_na)) /* deprecated */
62 #define POPpx (SvPVx(POPs, n_a))
463ee0b perl 5.0 alpha 4
Larry Wall authored
63 #define POPn (SvNVx(POPs))
a0d0e21 perl 5.000
Larry Wall authored
64 #define POPi ((IV)SvIVx(POPs))
ff68c71 [inseparable changes from patch from perl5.003_09 to perl5.003_10]
Perl 5 Porters authored
65 #define POPu ((UV)SvUVx(POPs))
463ee0b perl 5.0 alpha 4
Larry Wall authored
66 #define POPl ((long)SvIVx(POPs))
d9b3e12 @jhi Jumbo Configure and large file support update.
jhi authored
67 #define POPul ((unsigned long)SvIVx(POPs))
1b8cd67 @jhi Regen Configure.
jhi authored
68 #ifdef HAS_QUAD
d9b3e12 @jhi Jumbo Configure and large file support update.
jhi authored
69 #define POPq ((Quad_t)SvIVx(POPs))
c5a0f51 @jhi Implement 64-bit vec().
jhi authored
70 #define POPuq ((Uquad_t)SvUVx(POPs))
d9b3e12 @jhi Jumbo Configure and large file support update.
jhi authored
71 #endif
7907280 perl 5.0 alpha 2
Larry Wall authored
72
73 #define TOPs (*sp)
2d8e6c8 another threads reliability fix: serialize writes to thr->threadsv
Gurusamy Sarathy authored
74 #define TOPp (SvPV(TOPs, PL_na)) /* deprecated */
75 #define TOPpx (SvPV(TOPs, n_a))
463ee0b perl 5.0 alpha 4
Larry Wall authored
76 #define TOPn (SvNV(TOPs))
a0d0e21 perl 5.000
Larry Wall authored
77 #define TOPi ((IV)SvIV(TOPs))
ff68c71 [inseparable changes from patch from perl5.003_09 to perl5.003_10]
Perl 5 Porters authored
78 #define TOPu ((UV)SvUV(TOPs))
463ee0b perl 5.0 alpha 4
Larry Wall authored
79 #define TOPl ((long)SvIV(TOPs))
c5a0f51 @jhi Implement 64-bit vec().
jhi authored
80 #define TOPul ((unsigned long)SvUV(TOPs))
1b8cd67 @jhi Regen Configure.
jhi authored
81 #ifdef HAS_QUAD
d9b3e12 @jhi Jumbo Configure and large file support update.
jhi authored
82 #define TOPq ((Quad_t)SvIV(TOPs))
c5a0f51 @jhi Implement 64-bit vec().
jhi authored
83 #define TOPuq ((Uquad_t)SvUV(TOPs))
d9b3e12 @jhi Jumbo Configure and large file support update.
jhi authored
84 #endif
7907280 perl 5.0 alpha 2
Larry Wall authored
85
86 /* Go to some pains in the rare event that we must extend the stack. */
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
87 #define EXTEND(p,n) STMT_START { if (PL_stack_max - p < (n)) { \
bbce6d6 [inseparable changes from patch from perl5.003_08 to perl5.003_09]
Perl 5 Porters authored
88 sp = stack_grow(sp,p, (int) (n)); \
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
89 } } STMT_END
a0d0e21 perl 5.000
Larry Wall authored
90
7907280 perl 5.0 alpha 2
Larry Wall authored
91 /* Same thing, but update mark register too. */
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
92 #define MEXTEND(p,n) STMT_START {if (PL_stack_max - p < (n)) { \
93 int markoff = mark - PL_stack_base; \
bbce6d6 [inseparable changes from patch from perl5.003_08 to perl5.003_09]
Perl 5 Porters authored
94 sp = stack_grow(sp,p,(int) (n)); \
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
95 mark = PL_stack_base + markoff; \
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
96 } } STMT_END
7907280 perl 5.0 alpha 2
Larry Wall authored
97
98 #define PUSHs(s) (*++sp = (s))
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
99 #define PUSHTARG STMT_START { SvSETMAGIC(TARG); PUSHs(TARG); } STMT_END
100 #define PUSHp(p,l) STMT_START { sv_setpvn(TARG, (p), (l)); PUSHTARG; } STMT_END
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
101 #define PUSHn(n) STMT_START { sv_setnv(TARG, (NV)(n)); PUSHTARG; } STMT_END
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
102 #define PUSHi(i) STMT_START { sv_setiv(TARG, (IV)(i)); PUSHTARG; } STMT_END
55497cf [inseparable changes from patch from perl5.003_07 to perl5.003_08]
Perl 5 Porters authored
103 #define PUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); PUSHTARG; } STMT_END
7907280 perl 5.0 alpha 2
Larry Wall authored
104
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
105 #define XPUSHs(s) STMT_START { EXTEND(sp,1); (*++sp = (s)); } STMT_END
106 #define XPUSHTARG STMT_START { SvSETMAGIC(TARG); XPUSHs(TARG); } STMT_END
107 #define XPUSHp(p,l) STMT_START { sv_setpvn(TARG, (p), (l)); XPUSHTARG; } STMT_END
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
108 #define XPUSHn(n) STMT_START { sv_setnv(TARG, (NV)(n)); XPUSHTARG; } STMT_END
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
109 #define XPUSHi(i) STMT_START { sv_setiv(TARG, (IV)(i)); XPUSHTARG; } STMT_END
55497cf [inseparable changes from patch from perl5.003_07 to perl5.003_08]
Perl 5 Porters authored
110 #define XPUSHu(u) STMT_START { sv_setuv(TARG, (UV)(u)); XPUSHTARG; } STMT_END
b162f9e Optimize away OP_SASSIGN
Ilya Zakharevich authored
111 #define XPUSHundef STMT_START { SvOK_off(TARG); XPUSHs(TARG); } STMT_END
7907280 perl 5.0 alpha 2
Larry Wall authored
112
113 #define SETs(s) (*sp = s)
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
114 #define SETTARG STMT_START { SvSETMAGIC(TARG); SETs(TARG); } STMT_END
115 #define SETp(p,l) STMT_START { sv_setpvn(TARG, (p), (l)); SETTARG; } STMT_END
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
116 #define SETn(n) STMT_START { sv_setnv(TARG, (NV)(n)); SETTARG; } STMT_END
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
117 #define SETi(i) STMT_START { sv_setiv(TARG, (IV)(i)); SETTARG; } STMT_END
55497cf [inseparable changes from patch from perl5.003_07 to perl5.003_08]
Perl 5 Porters authored
118 #define SETu(u) STMT_START { sv_setuv(TARG, (UV)(u)); SETTARG; } STMT_END
a0d0e21 perl 5.000
Larry Wall authored
119
7907280 perl 5.0 alpha 2
Larry Wall authored
120 #define dTOPss SV *sv = TOPs
121 #define dPOPss SV *sv = POPs
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
122 #define dTOPnv NV value = TOPn
123 #define dPOPnv NV value = POPn
a0d0e21 perl 5.000
Larry Wall authored
124 #define dTOPiv IV value = TOPi
125 #define dPOPiv IV value = POPi
55497cf [inseparable changes from patch from perl5.003_07 to perl5.003_08]
Perl 5 Porters authored
126 #define dTOPuv UV value = TOPu
127 #define dPOPuv UV value = POPu
1b8cd67 @jhi Regen Configure.
jhi authored
128 #ifdef HAS_QUAD
2d4389e @jhi Batch of small 64-bit/long double/large file support tweaks:
jhi authored
129 #define dTOPqv Quad_t value = TOPu
130 #define dPOPqv Quad_t value = POPu
131 #define dTOPuqv Uquad_t value = TOPuq
132 #define dPOPuqv Uquad_t value = POPuq
133 #endif
7907280 perl 5.0 alpha 2
Larry Wall authored
134
7a4c00b [inseparable changes from patch from perl5.003_15 to perl5.003_16]
Perl 5 Porters authored
135 #define dPOPXssrl(X) SV *right = POPs; SV *left = CAT2(X,s)
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
136 #define dPOPXnnrl(X) NV right = POPn; NV left = CAT2(X,n)
7a4c00b [inseparable changes from patch from perl5.003_15 to perl5.003_16]
Perl 5 Porters authored
137 #define dPOPXiirl(X) IV right = POPi; IV left = CAT2(X,i)
138
139 #define USE_LEFT(sv) \
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
140 (SvOK(sv) || SvGMAGICAL(sv) || !(PL_op->op_flags & OPf_STACKED))
7a4c00b [inseparable changes from patch from perl5.003_15 to perl5.003_16]
Perl 5 Porters authored
141 #define dPOPXnnrl_ul(X) \
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
142 NV right = POPn; \
7a4c00b [inseparable changes from patch from perl5.003_15 to perl5.003_16]
Perl 5 Porters authored
143 SV *leftsv = CAT2(X,s); \
6520202 slightly tweaked version of suggested patch
Dan Sugalski authored
144 NV left = USE_LEFT(leftsv) ? SvNV(leftsv) : 0.0
7a4c00b [inseparable changes from patch from perl5.003_15 to perl5.003_16]
Perl 5 Porters authored
145 #define dPOPXiirl_ul(X) \
146 IV right = POPi; \
147 SV *leftsv = CAT2(X,s); \
148 IV left = USE_LEFT(leftsv) ? SvIV(leftsv) : 0
149
150 #define dPOPPOPssrl dPOPXssrl(POP)
151 #define dPOPPOPnnrl dPOPXnnrl(POP)
152 #define dPOPPOPnnrl_ul dPOPXnnrl_ul(POP)
153 #define dPOPPOPiirl dPOPXiirl(POP)
154 #define dPOPPOPiirl_ul dPOPXiirl_ul(POP)
155
156 #define dPOPTOPssrl dPOPXssrl(TOP)
157 #define dPOPTOPnnrl dPOPXnnrl(TOP)
158 #define dPOPTOPnnrl_ul dPOPXnnrl_ul(TOP)
159 #define dPOPTOPiirl dPOPXiirl(TOP)
160 #define dPOPTOPiirl_ul dPOPXiirl_ul(TOP)
7907280 perl 5.0 alpha 2
Larry Wall authored
161
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
162 #define RETPUSHYES RETURNX(PUSHs(&PL_sv_yes))
163 #define RETPUSHNO RETURNX(PUSHs(&PL_sv_no))
164 #define RETPUSHUNDEF RETURNX(PUSHs(&PL_sv_undef))
7907280 perl 5.0 alpha 2
Larry Wall authored
165
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
166 #define RETSETYES RETURNX(SETs(&PL_sv_yes))
167 #define RETSETNO RETURNX(SETs(&PL_sv_no))
168 #define RETSETUNDEF RETURNX(SETs(&PL_sv_undef))
7907280 perl 5.0 alpha 2
Larry Wall authored
169
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
170 #define ARGTARG PL_op->op_targ
b162f9e Optimize away OP_SASSIGN
Ilya Zakharevich authored
171
172 /* See OPpTARGET_MY: */
173 #define MAXARG (PL_op->op_private & 15)
7907280 perl 5.0 alpha 2
Larry Wall authored
174
e336de0 [win32] implement stack-of-stacks so that magic invocations don't
Gurusamy Sarathy authored
175 #define SWITCHSTACK(f,t) \
176 STMT_START { \
677b06e grow PL_tmps_stack more efficiently; make it more amenable to
Gurusamy Sarathy authored
177 AvFILLp(f) = sp - PL_stack_base; \
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
178 PL_stack_base = AvARRAY(t); \
677b06e grow PL_tmps_stack more efficiently; make it more amenable to
Gurusamy Sarathy authored
179 PL_stack_max = PL_stack_base + AvMAX(t); \
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
180 sp = PL_stack_sp = PL_stack_base + AvFILLp(t); \
677b06e grow PL_tmps_stack more efficiently; make it more amenable to
Gurusamy Sarathy authored
181 PL_curstack = t; \
e336de0 [win32] implement stack-of-stacks so that magic invocations don't
Gurusamy Sarathy authored
182 } STMT_END
7907280 perl 5.0 alpha 2
Larry Wall authored
183
bbce6d6 [inseparable changes from patch from perl5.003_08 to perl5.003_09]
Perl 5 Porters authored
184 #define EXTEND_MORTAL(n) \
677b06e grow PL_tmps_stack more efficiently; make it more amenable to
Gurusamy Sarathy authored
185 STMT_START { \
186 if (PL_tmps_ix + (n) >= PL_tmps_max) \
187 tmps_grow(n); \
188 } STMT_END
bbce6d6 [inseparable changes from patch from perl5.003_08 to perl5.003_09]
Perl 5 Porters authored
189
a0d0e21 perl 5.000
Larry Wall authored
190 #define AMGf_noright 1
191 #define AMGf_noleft 2
192 #define AMGf_assign 4
193 #define AMGf_unary 8
194
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
195 #define tryAMAGICbinW(meth,assign,set) STMT_START { \
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
196 if (PL_amagic_generation) { \
a0d0e21 perl 5.000
Larry Wall authored
197 SV* tmpsv; \
198 SV* right= *(sp); SV* left= *(sp-1);\
199 if ((SvAMAGIC(left)||SvAMAGIC(right))&&\
200 (tmpsv=amagic_call(left, \
201 right, \
202 CAT2(meth,_amg), \
203 (assign)? AMGf_assign: 0))) {\
204 SPAGAIN; \
205 (void)POPs; set(tmpsv); RETURN; } \
206 } \
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
207 } STMT_END
a0d0e21 perl 5.000
Larry Wall authored
208
209 #define tryAMAGICbin(meth,assign) tryAMAGICbinW(meth,assign,SETsv)
210 #define tryAMAGICbinSET(meth,assign) tryAMAGICbinW(meth,assign,SETs)
211
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
212 #define AMG_CALLun(sv,meth) amagic_call(sv,&PL_sv_undef, \
a0d0e21 perl 5.000
Larry Wall authored
213 CAT2(meth,_amg),AMGf_noright | AMGf_unary)
214 #define AMG_CALLbinL(left,right,meth) \
215 amagic_call(left,right,CAT2(meth,_amg),AMGf_noright)
216
e8c2096 Re: [PATCH 5.00552] Overloaded <> and deref again
Ilya Zakharevich authored
217 #define tryAMAGICunW(meth,set,shift,ret) STMT_START { \
3280af2 PL_ prefix to all perlvars, part1
Nick Ing-Simmons authored
218 if (PL_amagic_generation) { \
a0d0e21 perl 5.000
Larry Wall authored
219 SV* tmpsv; \
f5284f6 Overloaded <> and deref again
Ilya Zakharevich authored
220 SV* arg= sp[shift]; \
221 am_again: \
a0d0e21 perl 5.000
Larry Wall authored
222 if ((SvAMAGIC(arg))&&\
223 (tmpsv=AMG_CALLun(arg,meth))) {\
f5284f6 Overloaded <> and deref again
Ilya Zakharevich authored
224 SPAGAIN; if (shift) sp += shift; \
e8c2096 Re: [PATCH 5.00552] Overloaded <> and deref again
Ilya Zakharevich authored
225 set(tmpsv); ret; } \
a0d0e21 perl 5.000
Larry Wall authored
226 } \
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
227 } STMT_END
a0d0e21 perl 5.000
Larry Wall authored
228
f5284f6 Overloaded <> and deref again
Ilya Zakharevich authored
229 #define FORCE_SETs(sv) STMT_START { sv_setsv(TARG, (sv)); SETTARG; } STMT_END
230
b162f9e Optimize away OP_SASSIGN
Ilya Zakharevich authored
231 #define tryAMAGICun(meth) tryAMAGICunW(meth,SETsvUN,0,RETURN)
232 #define tryAMAGICunSET(meth) tryAMAGICunW(meth,SETs,0,RETURN)
f5284f6 Overloaded <> and deref again
Ilya Zakharevich authored
233 #define tryAMAGICunTARGET(meth, shift) \
234 { dSP; sp--; /* get TARGET from below PL_stack_sp */ \
235 { dTARGETSTACKED; \
e8c2096 Re: [PATCH 5.00552] Overloaded <> and deref again
Ilya Zakharevich authored
236 { dSP; tryAMAGICunW(meth,FORCE_SETs,shift,RETURN);}}}
237
238 #define setAGAIN(ref) sv = arg = ref; \
239 if (!SvROK(ref)) \
cea2e8a more complete support for implicit thread/interpreter pointer,
Gurusamy Sarathy authored
240 Perl_croak(aTHX_ "Overloaded dereference did not return a reference"); \
e8c2096 Re: [PATCH 5.00552] Overloaded <> and deref again
Ilya Zakharevich authored
241 goto am_again;
242
0f4592e bump patchlevel; other minor fixes for clean build and test on
Gurusamy Sarathy authored
243 #define tryAMAGICunDEREF(meth) tryAMAGICunW(meth,setAGAIN,0,(void)0)
a0d0e21 perl 5.000
Larry Wall authored
244
533c011 PL_ stuff for threads
Nick Ing-Simmons authored
245 #define opASSIGN (PL_op->op_flags & OPf_STACKED)
e990555 perl 5.003_01: pp.h
Perl 5 Porters authored
246 #define SETsv(sv) STMT_START { \
b162f9e Optimize away OP_SASSIGN
Ilya Zakharevich authored
247 if (opASSIGN || (SvFLAGS(TARG) & SVs_PADMY)) \
248 { sv_setsv(TARG, (sv)); SETTARG; } \
249 else SETs(sv); } STMT_END
250
251 #define SETsvUN(sv) STMT_START { \
252 if (SvFLAGS(TARG) & SVs_PADMY) \
253 { sv_setsv(TARG, (sv)); SETTARG; } \
e990555 perl 5.003_01: pp.h
Perl 5 Porters authored
254 else SETs(sv); } STMT_END
a0d0e21 perl 5.000
Larry Wall authored
255
256 /* newSVsv does not behave as advertised, so we copy missing
257 * information by hand */
258
76e3520 [asperl] added AS patch#2
Gurusamy Sarathy authored
259 /* SV* ref causes confusion with the member variable
260 changed SV* ref to SV* tmpRef */
261 #define RvDEEPCP(rv) STMT_START { SV* tmpRef=SvRV(rv); \
262 if (SvREFCNT(tmpRef)>1) { \
263 SvREFCNT_dec(tmpRef); \
748a930 Perl 5.001
Larry Wall authored
264 SvRV(rv)=AMG_CALLun(rv,copy); \
8654792 Incorporate new single-statement macros
Perl 5 Porters authored
265 } } STMT_END
Something went wrong with that request. Please try again.