Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions pp_hot.c
Original file line number Diff line number Diff line change
Expand Up @@ -3144,7 +3144,9 @@ PP(pp_aassign)
case SVt_PVHV: { /* normal hash */

SV **svp;
#ifndef PERL_RC_STACK
SSize_t i;
#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When struggling with the build-time warning (as mentioned in #23661 (comment)), I got this far ...

SSize_t nelems = lastrelem - relem + 1;
HV *hash = MUTABLE_HV(lsv);

Expand Down Expand Up @@ -3323,7 +3325,12 @@ PP(pp_aassign)
SV **svp;
SV **topelem = relem;

for (i = 0, svp = relem; svp <= lastrelem; i++, svp++) {
#ifdef PERL_RC_STACK
for (svp = relem; svp <= lastrelem; svp++)
#else
for (i = 0, svp = relem; svp <= lastrelem; i++, svp++)
#endif
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... but didn't realize I should have put this for loop statement inside an #ifdef ... #else ... #endif structure; below as well. Thanks.

SV *key = *svp++;
SV *val = *svp;
/* remove duplicates from list we return */
Expand Down Expand Up @@ -3368,7 +3375,12 @@ PP(pp_aassign)
}
else {
SV **svp;
for (i = 0, svp = relem; svp <= lastrelem; i++, svp++) {
#ifdef PERL_RC_STACK
for (svp = relem; svp <= lastrelem; svp++)
#else
for (i = 0, svp = relem; svp <= lastrelem; i++, svp++)
#endif
{
SV *key = *svp++;
SV *val = *svp;
#ifdef PERL_RC_STACK
Expand Down
Loading