diff options
author | Yves Orton <demerphq@gmail.com> | 2022-10-31 14:41:27 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-11-01 11:57:31 +0100 |
commit | 6848aea2c844896efb347e6a210098c7dd447567 (patch) | |
tree | fd5ac721106fe55e061272248af6c7982bf1966a /util.c | |
parent | 4bd3be3563698eb6e927a62c29755b216b926a27 (diff) | |
download | perl-6848aea2c844896efb347e6a210098c7dd447567.tar.gz |
op.c - use refcounted pv pointers for cop_warnings
this allows multiple ops to share the same underlying
warning bit vector. the vectors are not deduped, however
they are efficiently copied and shared.
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -2391,10 +2391,7 @@ Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const char *const bits, PERL_UNUSED_CONTEXT; PERL_ARGS_ASSERT_NEW_WARNINGS_BITFIELD; - buffer = (STRLEN*) - (specialWARN(buffer) ? - PerlMemShared_malloc(len_wanted) : - PerlMemShared_realloc(buffer, len_wanted)); + buffer = (STRLEN*)rcpv_new(NULL, len_wanted, RCPVf_NO_COPY); buffer[0] = size; Copy(bits, (buffer + 1), size, char); if (size < WARNsize) |