diff options
author | Nicholas Clark <nick@ccl4.org> | 2021-09-27 11:48:14 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2021-10-11 11:30:25 +0000 |
commit | 9faee2eae78e645be21d3d1de656460e8ea20f60 (patch) | |
tree | 9a6c531b037827fdc672ddd27f6fee58c939d6ed /sv.c | |
parent | caf0b9e5682bde101a4ee56b69daee5f3362ad0e (diff) | |
download | perl-9faee2eae78e645be21d3d1de656460e8ea20f60.tar.gz |
Move variables in Perl_sv_clear() to a tighter scope.
These three variables don't hold their values between iterations of the
while loop, so can be declared within it, to make this obvious.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -6631,9 +6631,6 @@ instead. void Perl_sv_clear(pTHX_ SV *const orig_sv) { - HV *stash; - U32 type; - const struct body_details *sv_type_details; SV* iter_sv = NULL; SV* next_sv = NULL; SV *sv = orig_sv; @@ -6647,8 +6644,9 @@ Perl_sv_clear(pTHX_ SV *const orig_sv) * over to provide more SVs */ while (sv) { - - type = SvTYPE(sv); + U32 type = SvTYPE(sv); + const struct body_details *sv_type_details; + HV *stash; assert(SvREFCNT(sv) == 0); assert(SvTYPE(sv) != (svtype)SVTYPEMASK); |