Skip to content

Commit

Permalink
Make the logic easier to follow.
Browse files Browse the repository at this point in the history
  • Loading branch information
rafl committed Mar 11, 2009
1 parent 384bb6c commit 38d91dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mop.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,11 +268,11 @@ XS(mop_xs_simple_reader)
croak("object is not a hashref");
}

if (!(he = hv_fetch_ent((HV *)SvRV(self), prehashed_keys[key].key, 0, prehashed_keys[key].hash))) {
ST(0) = &PL_sv_undef;
if ((he = hv_fetch_ent((HV *)SvRV(self), prehashed_keys[key].key, 0, prehashed_keys[key].hash))) {
ST(0) = HeVAL(he);
}
else {
ST(0) = HeVAL(he);
ST(0) = &PL_sv_undef;
}

XSRETURN(1);
Expand Down

0 comments on commit 38d91dd

Please sign in to comment.