diff options
author | Yves Orton <demerphq@gmail.com> | 2022-11-22 15:41:14 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-11-23 11:28:17 +0100 |
commit | a511d7dcd744640a1ebc498a80f1d05411368c83 (patch) | |
tree | b4f1b91e2b01437e9e3b774df713911ef8c076b9 /util.c | |
parent | 4d6de2e9446beedb11b442184296d8c374d12741 (diff) | |
download | perl-a511d7dcd744640a1ebc498a80f1d05411368c83.tar.gz |
op.c - add support for empty RCPV strings.
Currently we have no need for an empty shared string, but there is no
reason it should not be possible. This patch reworks the internals so it
is possible to create one without triggering asserts. Currently we don't
use this, but it seems reasonable that someone might want it in the
future. Under DEBUGGING we will still assert if someone tries to create
an empty RCPV unless the flag specifies it should be allowed.
At the same time the docs for rcpv_new() have been cleaned up a bit to
be more correct and reflect what actually happens inside.
This changes things so that the len member of the RCPV structure is
always non-zero in a well formed structure by accounting for the null
we add to the end explicitly. The RCPV_LEN() macro continues to return
the old value (not including the null).
Diffstat (limited to 'util.c')
0 files changed, 0 insertions, 0 deletions