This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add Perl_magic_freecollxfrm() magic vtable method
authorDavid Mitchell <davem@iabyn.com>
Mon, 19 Oct 2020 13:43:18 +0000 (14:43 +0100)
committerDavid Mitchell <davem@iabyn.com>
Fri, 23 Oct 2020 13:25:52 +0000 (14:25 +0100)
commita457b73cb378d9c4e10ffbacfc9a472be9395057
tree62be5c2b4d8267303b222f39544417f62c55b27a
parentb0441c5bc62aa2ba1980c5ae151db48af58bcfcf
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.
embed.fnc
embed.h
mg.c
mg_vtable.h
proto.h
regen/mg_vtable.pl