summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 10:53:55 +0000
commit20408e3ccf502b6ce4033d8203710405ec9ef8f6 (patch)
treeafa7181c847061200a7323363f84fe42102c2aa3 /sv.c
parent9b599b2a63d2324ddacddd9710c41b795a95070d (diff)
downloadperl-20408e3ccf502b6ce4033d8203710405ec9ef8f6.tar.gz
[win32] merge change#896 from maintbranch
p4raw-link: @896 on //depot/maint-5.004/perl: 0562b9ae2b0eff79632fc0164c13c34c06a019e2 p4raw-id: //depot/win32/perl@938
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sv.c b/sv.c
index ff9986771e..b5e408c19e 100644
--- a/sv.c
+++ b/sv.c
@@ -1906,8 +1906,11 @@ sv_setsv(SV *dstr, register SV *sstr)
switch (stype) {
case SVt_NULL:
- (void)SvOK_off(dstr);
- return;
+ if (dtype != SVt_PVGV) {
+ (void)SvOK_off(dstr);
+ return;
+ }
+ break;
case SVt_IV:
if (dtype != SVt_IV && dtype < SVt_PVIV) {
if (dtype < SVt_IV)
@@ -2209,7 +2212,12 @@ sv_setsv(SV *dstr, register SV *sstr)
SvIVX(dstr) = SvIVX(sstr);
}
else {
- (void)SvOK_off(dstr);
+ if (dtype == SVt_PVGV) {
+ if (dowarn)
+ warn("Undefined value assigned to typeglob");
+ }
+ else
+ (void)SvOK_off(dstr);
}
SvTAINT(dstr);
}