Skip to content

Commit

Permalink
simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
demerphq committed Nov 23, 2012
1 parent 64aa8c0 commit 181b6be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Perl/Encoder/srl_encoder.c
Expand Up @@ -845,7 +845,7 @@ srl_dump_sv(pTHX_ srl_encoder_t *enc, SV *src)
UV refcount; UV refcount;
svtype svt; svtype svt;
MAGIC *mg; MAGIC *mg;
AV **backrefs; AV *backrefs;
SV* refsv= NULL; SV* refsv= NULL;
UV weakref_ofs= 0; /* preserved between loops */ UV weakref_ofs= 0; /* preserved between loops */
ssize_t ref_rewrite_pos= 0; /* preserved between loops */ ssize_t ref_rewrite_pos= 0; /* preserved between loops */
Expand All @@ -863,8 +863,8 @@ srl_dump_sv(pTHX_ srl_encoder_t *enc, SV *src)
mg = mg_find(src, PERL_MAGIC_backref); mg = mg_find(src, PERL_MAGIC_backref);
} }
if (svt == SVt_PVHV) if (svt == SVt_PVHV)
backrefs= Perl_hv_backreferences_p(aTHX_ MUTABLE_HV(src)); backrefs= *Perl_hv_backreferences_p(aTHX_ MUTABLE_HV(src));
if ( mg || ( backrefs && *backrefs ) ) { if ( mg || backrefs ) {
PTABLE_t *weak_seenhash= SRL_GET_WEAK_SEENHASH(enc); PTABLE_t *weak_seenhash= SRL_GET_WEAK_SEENHASH(enc);
PTABLE_ENTRY_t *pe= PTABLE_find(weak_seenhash, src); PTABLE_ENTRY_t *pe= PTABLE_find(weak_seenhash, src);
if (!pe) { if (!pe) {
Expand Down

0 comments on commit 181b6be

Please sign in to comment.