diff options
author | Yves Orton <demerphq@gmail.com> | 2013-03-24 11:48:12 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2013-03-24 11:50:18 +0100 |
commit | e1a7ec8d453649a65aea34af90c3042a5137191e (patch) | |
tree | c865e78cabc2b4ec7436679e51e55609c6d397cb /hv.h | |
parent | ff20b672a2557d27fcb80d597224fa0c24e43f73 (diff) | |
download | perl-e1a7ec8d453649a65aea34af90c3042a5137191e.tar.gz |
improve how Devel::Peek::Dump handles iterator information
* If the hash is not OOK omit any iterator status information
instead of showing -1/NULL
* If the hash is OOK then add the RAND value from the iterator
and if the LASTRAND is not the same show it too
* Tweak tests to test the above.
Diffstat (limited to 'hv.h')
-rw-r--r-- | hv.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -226,6 +226,9 @@ C<SV*>. #define HvEITER_set(hv,e) Perl_hv_eiter_set(aTHX_ MUTABLE_HV(hv), e) #define HvRITER_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_riter : -1) #define HvEITER_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_eiter : NULL) +#define HvRAND_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_rand : 0) +#define HvLASTRAND_get(hv) (SvOOK(hv) ? HvAUX(hv)->xhv_last_rand : 0) + #define HvNAME(hv) HvNAME_get(hv) #define HvNAMELEN(hv) HvNAMELEN_get(hv) #define HvENAME(hv) HvENAME_get(hv) |