summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-01-18 18:09:07 -0500
committerGurusamy Sarathy <gsar@cpan.org>1998-01-19 04:10:43 +0000
commit189b2af51bf236b53a02db0b105a3de423d3fff4 (patch)
treee144975915f994ffa46db0ce8f0bc73998c7566d /sv.c
parentf5cd9d9c4a18b1d2556c41570273131b83659fe4 (diff)
downloadperl-189b2af51bf236b53a02db0b105a3de423d3fff4.tar.gz
[win32] Fix autovivification problems with XSUB OUTPUT args
Message-Id: <199801190409.XAA26710@aatma.engin.umich.edu> Subject: [PATCH] XSUB OUTPUT arguments and 'set' magic p4raw-id: //depot/win32/perl@430
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index d6c10391e3..b0d7f973b1 100644
--- a/sv.c
+++ b/sv.c
@@ -3906,8 +3906,10 @@ newSVrv(SV *rv, char *classname)
SV*
sv_setref_pv(SV *rv, char *classname, void *pv)
{
- if (!pv)
+ if (!pv) {
sv_setsv(rv, &sv_undef);
+ SvSETMAGIC(rv);
+ }
else
sv_setiv(newSVrv(rv,classname), (IV)pv);
return rv;