diff options
author | Yves Orton <demerphq@gmail.com> | 2014-12-25 03:21:47 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2014-12-25 03:21:47 +0100 |
commit | 34f2dd859e2563e188f2f6c301b08ba1ce795d73 (patch) | |
tree | dfc9f2cb849654a3629e50a045e79461b9afb05f /hv.c | |
parent | 5f2e6de730e40b8a110897a11d3e20407b66a38c (diff) | |
download | perl-34f2dd859e2563e188f2f6c301b08ba1ce795d73.tar.gz |
Restructure hv_backreferences_p() so assert makes sense
Prior to this patch the assert was meaningless as we would
use the argument before we asserted things about it.
This patch restructures the logic so we do the asserts first
and *then* use the argument.
Diffstat (limited to 'hv.c')
-rw-r--r-- | hv.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2447,11 +2447,11 @@ Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len, U32 flags) AV ** Perl_hv_backreferences_p(pTHX_ HV *hv) { - struct xpvhv_aux * const iter = SvOOK(hv) ? HvAUX(hv) : hv_auxinit(hv); - PERL_ARGS_ASSERT_HV_BACKREFERENCES_P; - - return &(iter->xhv_backreferences); + { + struct xpvhv_aux * const iter = SvOOK(hv) ? HvAUX(hv) : hv_auxinit(hv); + return &(iter->xhv_backreferences); + } } void |