diff options
author | Daniel Dragan <bulk88@hotmail.com> | 2015-07-29 03:31:23 -0400 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-08-03 11:50:54 +1000 |
commit | 997c424a5725c6a1ddfcced6f5d13535e970f842 (patch) | |
tree | 968e36f2ccaacdb6ee4ddf8d90b4ca67e2a8756e /locale.c | |
parent | c0b7e5912401cf8f1eedc72206b90e6f1623729a (diff) | |
download | perl-997c424a5725c6a1ddfcced6f5d13535e970f842.tar.gz |
Safefree(NULL) reduction
locale.c:
- the pointers are always null at this point, see
http://www.nntp.perl.org/group/perl.perl5.porters/2015/07/msg229533.html
pp.c:
- reduce scope of temp_buffer and svrecode, into an inner branch
- in some permutations, either temp_buffer is never set to non-null, or
svrecode, in permutations where it is known that the var hasn't been set
yet, skip the freeing calls at the end, this doesn't eliminate all
permutations with NULL being passed to Safefree and SvREFCNT_dec, but
only some of them
regcomp.c
- dont create a save stack entry to call Safefree(NULL), see ticket for
this patch for some profiling stats
Diffstat (limited to 'locale.c')
-rw-r--r-- | locale.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -707,7 +707,6 @@ Perl_init_i18nl10n(pTHX_ int printwarn) } if (!setlocale_failure) { # ifdef USE_LOCALE_CTYPE - Safefree(curctype); if (! (curctype = my_setlocale(LC_CTYPE, (!done && (lang || PerlEnv_getenv("LC_CTYPE"))) @@ -717,7 +716,6 @@ Perl_init_i18nl10n(pTHX_ int printwarn) curctype = savepv(curctype); # endif /* USE_LOCALE_CTYPE */ # ifdef USE_LOCALE_COLLATE - Safefree(curcoll); if (! (curcoll = my_setlocale(LC_COLLATE, (!done && (lang || PerlEnv_getenv("LC_COLLATE"))) @@ -727,7 +725,6 @@ Perl_init_i18nl10n(pTHX_ int printwarn) curcoll = savepv(curcoll); # endif /* USE_LOCALE_COLLATE */ # ifdef USE_LOCALE_NUMERIC - Safefree(curnum); if (! (curnum = my_setlocale(LC_NUMERIC, (!done && (lang || PerlEnv_getenv("LC_NUMERIC"))) |