diff options
author | Yves Orton <demerphq@gmail.com> | 2022-12-18 18:42:34 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-12-22 15:41:12 +0100 |
commit | 332af2278b8db03a0735d24a17bbaae7f7e20112 (patch) | |
tree | 18170096c3ea3401104a2cacb76ddcad52b11151 /t/porting | |
parent | 81620fbedd5f5cb87f240d7809dc669cd60d0139 (diff) | |
download | perl-332af2278b8db03a0735d24a17bbaae7f7e20112.tar.gz |
sv.c - add support for HvNAMEf and HvNAMEf_QUOTEDPREFIX formats
They are similar to SVf and SVf_QUOTEDPREFIX but take an HV * argument
and use HvNAME() and related macros to extract the string. This is
helpful as it makes constructing error messages from a stash (HV *)
easier. It is the callers responsibility to ensure that the HV is
actually a stash.
Diffstat (limited to 't/porting')
-rw-r--r-- | t/porting/diag.t | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/porting/diag.t b/t/porting/diag.t index 2dfd2f8358..97dff94fa6 100644 --- a/t/porting/diag.t +++ b/t/porting/diag.t @@ -220,7 +220,10 @@ my %specialformats = (IVdf => 'd', SVf => 's', SVf_QUOTEDPREFIX => 'S', PVf_QUOTEDPREFIX => 'S', - PNf => 's'); + PNf => 's', + HvNAMEf => 's', + HvNAMEf_QUOTEDPREFIX => 's', + ); my $format_modifiers = qr/ [#0\ +-]* # optional flags (?: [1-9][0-9]* | \* )? # optional field width |