summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2022-09-26 15:00:21 +0200
committerYves Orton <demerphq@gmail.com>2022-10-18 15:50:30 +0200
commit40d662ad46f02fed253b998c4691175dd158c128 (patch)
tree387b3d846ee8ccee899f851c8021b70550cf19c9 /util.c
parentfc9696a5e55c64ae01cfd7890d3b832cb309b822 (diff)
downloadperl-40d662ad46f02fed253b998c4691175dd158c128.tar.gz
dump.c - add ways to dump HV's and AV's and SV's to any depth.
Currently you can use sv_dump() to dump an AV or HV as these are still SV's underneath in C terms, but it will only dump out the top level object and will not dump out its contents, whereas if you have an RV which references the same AV or HV it will dump it out to depth of 4. This adds av_dump() and hv_dump() which dump up to a depth of 3 (thus matching what sv_dump() would have showed had it been used to dump an RV to the same object). It also adds sv_dump_depth() which allows passing in an arbitrary depth. You could argue the former are redundant in light of sv_dump_depth(), but the av_dump() and hv_dump() variants do not require a cast for their arguments. These functions are provided as debugging aids for development. They aren't used directly in the core, and they all wrap the same core routine that is used for sv_dump() (do_sv_dump()).
Diffstat (limited to 'util.c')
0 files changed, 0 insertions, 0 deletions