summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@pobox.com>2012-07-10 23:19:02 -0700
committerChip Salzenberg <chip@pobox.com>2012-07-10 23:19:02 -0700
commitb399897db8a3df44f65c21cfccdfa24fda1d4657 (patch)
tree3c956715cb6af7919a35a18fc89c0c166654b7b8 /doio.c
parent6008229130183ac5d99c7ba4f4e05dfdb2734103 (diff)
downloadperl-b399897db8a3df44f65c21cfccdfa24fda1d4657.tar.gz
ensure shmread() calls get and set magic once
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/doio.c b/doio.c
index 5682426da9..fd6683da26 100644
--- a/doio.c
+++ b/doio.c
@@ -2283,9 +2283,10 @@ Perl_do_shmio(pTHX_ I32 optype, SV **mark, SV **sp)
if (optype == OP_SHMREAD) {
char *mbuf;
/* suppress warning when reading into undef var (tchrist 3/Mar/00) */
+ SvGETMAGIC(mstr);
+ SvUPGRADE(mstr, SVt_PV);
if (! SvOK(mstr))
sv_setpvs(mstr, "");
- SvUPGRADE(mstr, SVt_PV);
SvPOK_only(mstr);
mbuf = SvGROW(mstr, (STRLEN)msize+1);