projects
/
p5sagit/p5-mst-13.2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
PerlIO_read() can return negative.
[p5sagit/p5-mst-13.2.git]
/
av.c
diff --git
a/av.c
b/av.c
index
8fb22d3
..
d37ba01
100644
(file)
--- a/
av.c
+++ b/
av.c
@@
-209,9
+209,11
@@
Perl_av_fetch(pTHX_ register AV *av, I32 key, I32 lval)
}
sv = sv_newmortal();
- mg_copy((SV*)av, sv, 0, key);
- PL_av_fetch_sv = sv;
- return &PL_av_fetch_sv;
+ sv_upgrade(sv, SVt_PVLV);
+ mg_copy((SV*)av, sv, 0, key);
+ LvTYPE(sv) = 't';
+ LvTARG(sv) = sv; /* fake (SV**) */
+ return &(LvTARG(sv));
}
}