summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2008-01-11 17:00:59 +0000
committerNicholas Clark <nick@ccl4.org>2008-01-11 17:00:59 +0000
commit402d2eb1990caf116b392579a55f0a4f317d2738 (patch)
tree724a49a2c107179dda8887755c54a52a720e9144 /perl.c
parent2f3529075cdaceeaf619b8bd308885878ec9828a (diff)
downloadperl-402d2eb1990caf116b392579a55f0a4f317d2738.tar.gz
Pack the recycled pad offsets into an SV at PL_regex_pad[0]. This will
use less memory than an AV. p4raw-id: //depot/perl@32959
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index 4397087ab9..e8821a500d 100644
--- a/perl.c
+++ b/perl.c
@@ -353,8 +353,9 @@ perl_construct(pTHXx)
sv_setpvn(PERL_DEBUG_PAD(1), "", 0); /* ext/re needs these */
sv_setpvn(PERL_DEBUG_PAD(2), "", 0); /* even without DEBUGGING. */
#ifdef USE_ITHREADS
- /* First entry is an array of empty elements */
- Perl_av_create_and_push(aTHX_ &PL_regex_padav,(SV*)newAV());
+ /* First entry is a list of empty elements. It needs to be initialised
+ else all hell breaks loose in S_find_uninit_var(). */
+ Perl_av_create_and_push(aTHX_ &PL_regex_padav, newSVpvs(""));
PL_regex_pad = AvARRAY(PL_regex_padav);
#endif
#ifdef USE_REENTRANT_API