Change 32701 by [EMAIL PROTECTED] on 2007/12/22 12:50:35
Correct the minor mistake of changes 32675 and 32676 - the check should
be on whether the SV had a body before upgrading. As was, SVt_RV would
needlessly have re-zeroed memory.
Affected files ...
... //depot/perl/sv.c#1446 edit
Differences ...
==== //depot/perl/sv.c#1446 (text) ====
Index: perl/sv.c
--- perl/sv.c#1445~32676~ 2007-12-20 12:23:45.000000000 -0800
+++ perl/sv.c 2007-12-22 04:50:35.000000000 -0800
@@ -1253,7 +1253,7 @@
AvMAX(sv) = -1;
AvFILLp(sv) = -1;
AvREAL_only(sv);
- if (old_type >= SVt_RV) {
+ if (old_type_details->body_size) {
AvALLOC(sv) = 0;
} else {
/* It will have been zeroed when the new body was allocated.
@@ -1267,7 +1267,7 @@
HvSHAREKEYS_on(sv); /* key-sharing on by default */
#endif
HvMAX(sv) = 7; /* (start with 8 buckets) */
- if (old_type >= SVt_RV) {
+ if (old_type_details->body_size) {
HvFILL(sv) = 0;
} else {
/* It will have been zeroed when the new body was allocated.
End of Patch.