diff options
author | David Mitchell <davem@iabyn.com> | 2020-10-19 14:43:18 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2020-10-23 14:25:52 +0100 |
commit | a457b73cb378d9c4e10ffbacfc9a472be9395057 (patch) | |
tree | 62be5c2b4d8267303b222f39544417f62c55b27a /mg_vtable.h | |
parent | b0441c5bc62aa2ba1980c5ae151db48af58bcfcf (diff) | |
download | perl-a457b73cb378d9c4e10ffbacfc9a472be9395057.tar.gz |
add Perl_magic_freecollxfrm() magic vtable method
v5.29.9-139-g44955e7de8 added a workaround to S_mg_free_struct() to
free mg->mg_ptr in PERL_MAGIC_collxfrm even if mg_len is zero.
Move this logic into a new magic vtable free method instead, so that
S_mg_free_struct() (which gets called for every type of magic) doesn't
have the overhead of checking every time for mg->mg_type ==
PERL_MAGIC_collxfrm.
Diffstat (limited to 'mg_vtable.h')
-rw-r--r-- | mg_vtable.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mg_vtable.h b/mg_vtable.h index e4f3f3889d..809ab0e236 100644 --- a/mg_vtable.h +++ b/mg_vtable.h @@ -158,7 +158,7 @@ EXT_MGVTBL PL_magic_vtables[magic_vtable_max] = { { 0, 0, 0, 0, Perl_magic_killbackrefs, 0, 0, 0 }, { 0, 0, 0, 0, 0, Perl_magic_copycallchecker, 0, 0 }, #ifdef USE_LOCALE_COLLATE - { 0, Perl_magic_setcollxfrm, 0, 0, 0, 0, 0, 0 }, + { 0, Perl_magic_setcollxfrm, 0, 0, Perl_magic_freecollxfrm, 0, 0, 0 }, #else { 0, 0, 0, 0, 0, 0, 0, 0 }, #endif |