summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-30 09:23:36 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-01-30 09:23:36 +0000
commit76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4 (patch)
tree1d4e5f5653fd9def6bd71cc0cb536400223f4d3e /gv.c
parent6ad3d225cec2692b410002582f5558652eea32c8 (diff)
downloadperl-76e3520e1f6b7df33cd381a2cf4f1fce3d69c8a4.tar.gz
[asperl] added AS patch#2
p4raw-id: //depot/asperl@443
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gv.c b/gv.c
index 7d8df6cd17..3086bcbecc 100644
--- a/gv.c
+++ b/gv.c
@@ -104,7 +104,7 @@ gv_init(GV *gv, HV *stash, char *name, STRLEN len, int multi)
GvMULTI_on(gv);
}
-static void
+STATIC void
gv_init_sv(GV *gv, I32 sv_type)
{
switch (sv_type) {
@@ -1137,15 +1137,19 @@ amagic_call(SV *left, SV *right, int method, int flags)
break;
case copy_amg:
{
- SV* ref=SvRV(left);
- if (!SvROK(ref) && SvTYPE(ref) <= SVt_PVMG) {
+ /*
+ * SV* ref causes confusion with the interpreter variable of
+ * the same name
+ */
+ SV* tmpRef=SvRV(left);
+ if (!SvROK(tmpRef) && SvTYPE(tmpRef) <= SVt_PVMG) {
/*
* Just to be extra cautious. Maybe in some
* additional cases sv_setsv is safe, too.
*/
- SV* newref = newSVsv(ref);
+ SV* newref = newSVsv(tmpRef);
SvOBJECT_on(newref);
- SvSTASH(newref) = (HV*)SvREFCNT_inc(SvSTASH(ref));
+ SvSTASH(newref) = (HV*)SvREFCNT_inc(SvSTASH(tmpRef));
return newref;
}
}
@@ -1314,7 +1318,7 @@ amagic_call(SV *left, SV *right, int method, int flags)
PUTBACK;
if (op = pp_entersub(ARGS))
- runops();
+ CALLRUNOPS();
LEAVE;
SPAGAIN;