From 20408e3ccf502b6ce4033d8203710405ec9ef8f6 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 14 May 1998 10:53:55 +0000 Subject: [win32] merge change#896 from maintbranch p4raw-link: @896 on //depot/maint-5.004/perl: 0562b9ae2b0eff79632fc0164c13c34c06a019e2 p4raw-id: //depot/win32/perl@938 --- sv.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sv.c') 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); } -- cgit v1.2.1 From 34e9701933920a1b91b5f5717935652f86850872 Mon Sep 17 00:00:00 2001 From: Nick Ing-Simmons Date: Thu, 14 May 1998 18:09:01 +0000 Subject: Changes to allow compiler with gcc-2.8.1 in C++ mode, Remove K&R style functions, avoid struct/typedef clash. p4raw-id: //depot/ansiperl@972 --- sv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index ff9986771e..193734e674 100644 --- a/sv.c +++ b/sv.c @@ -3558,9 +3558,7 @@ newSVpv(char *s, STRLEN len) } SV * -newSVpvn(s,len) -char *s; -STRLEN len; +newSVpvn(char *s, STRLEN len) { register SV *sv; -- cgit v1.2.1 From 6ee623d521a149edc6574c512fa951a192cd086a Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Thu, 14 May 1998 22:24:26 +0000 Subject: [win32] integrate mainline p4raw-id: //depot/win32/perl@973 --- sv.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index b5e408c19e..8d8d6149e9 100644 --- a/sv.c +++ b/sv.c @@ -2429,11 +2429,7 @@ sv_catpv_mg(register SV *sv, register char *ptr) } SV * -#ifdef LEAKTEST -newSV(I32 x, STRLEN len) -#else newSV(STRLEN len) -#endif { register SV *sv; -- cgit v1.2.1 From 48c036b1eb8f866b948f33704ee6152323a5aad9 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 15 May 1998 01:34:53 +0000 Subject: [win32] merge change#905 from maintbranch, minor fixes to get clean build+test on Solaris p4raw-link: @905 on //depot/maint-5.004/perl: 15e73149a8419f18d739227762eab108524cec56 p4raw-id: //depot/win32/perl@976 --- sv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index 8d8d6149e9..368525274b 100644 --- a/sv.c +++ b/sv.c @@ -3703,7 +3703,7 @@ sv_reset(register char *s, HV *stash) if (!*s) { /* reset ?? searches */ for (pm = HvPMROOT(stash); pm; pm = pm->op_pmnext) { - pm->op_pmflags &= ~PMf_USED; + pm->op_pmdynflags &= ~PMdf_USED; } return; } -- cgit v1.2.1 From 6ff81951f79dec32e15a779d288c1047f0e4fefb Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Fri, 15 May 1998 02:15:25 +0000 Subject: [win32] merge changes#906,907,909,910 from maintbranch p4raw-link: @910 on //depot/maint-5.004/perl: ae941ac0da8f453f0d31df7b7293e50b3e5a46f1 p4raw-link: @909 on //depot/maint-5.004/perl: 8b3d696ffd11cf2e49f6eaa575b829ab0a55352d p4raw-link: @907 on //depot/maint-5.004/perl: 3cb3c1abada5765ba4166ebe59e2e20d737ec21b p4raw-link: @906 on //depot/maint-5.004/perl: ae389c8a29b487f4434c465442dfb611507a4a38 p4raw-id: //depot/win32/perl@977 --- sv.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sv.c') diff --git a/sv.c b/sv.c index 368525274b..8310047b45 100644 --- a/sv.c +++ b/sv.c @@ -2638,10 +2638,17 @@ sv_insert(SV *bigstr, STRLEN offset, STRLEN len, char *little, STRLEN littlelen) register char *midend; register char *bigend; register I32 i; + STRLEN curlen; + if (!bigstr) croak("Can't modify non-existent substring"); - SvPV_force(bigstr, na); + SvPV_force(bigstr, curlen); + if (offset + len > curlen) { + SvGROW(bigstr, offset+len+1); + Zero(SvPVX(bigstr)+curlen, offset+len-curlen, char); + SvCUR_set(bigstr, offset+len); + } i = littlelen - len; if (i > 0) { /* string might grow */ -- cgit v1.2.1