diff options
author | David Mitchell <davem@iabyn.com> | 2020-10-19 14:54:59 +0100 |
---|---|---|
committer | David Mitchell <davem@iabyn.com> | 2020-10-23 14:25:52 +0100 |
commit | 032a49194dbdca7f62038e1b4af134d72972ecd8 (patch) | |
tree | 162fac0720de09a915c6bfc0b30f8c1039129240 /embed.fnc | |
parent | a457b73cb378d9c4e10ffbacfc9a472be9395057 (diff) | |
download | perl-032a49194dbdca7f62038e1b4af134d72972ecd8.tar.gz |
add Perl_magic_freeutf8() magic vtable method
S_mg_free_struct() has a workaround to free mg->mg_ptr in
PERL_MAGIC_utf8 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_utf8.
Diffstat (limited to 'embed.fnc')
-rw-r--r-- | embed.fnc | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1329,6 +1329,7 @@ p |int |magic_settaint |NN SV* sv|NN MAGIC* mg p |int |magic_setuvar |NN SV* sv|NN MAGIC* mg p |int |magic_setvec |NN SV* sv|NN MAGIC* mg p |int |magic_setutf8 |NN SV* sv|NN MAGIC* mg +p |int |magic_freeutf8 |NN SV* sv|NN MAGIC* mg p |int |magic_set_all_env|NN SV* sv|NN MAGIC* mg p |U32 |magic_sizepack |NN SV* sv|NN MAGIC* mg p |int |magic_wipepack |NN SV* sv|NN MAGIC* mg |