Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5)

Unified Diff: Objects/genobject.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Objects/codeobject.c ('k') | Objects/stringlib/string_format.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Objects/genobject.c Tue Jul 26 09:37:46 2011 +0300
+++ b/Objects/genobject.c Mon Jul 25 09:47:18 2011 -0400
@@ -395,13 +395,15 @@
int i;
PyFrameObject *f = gen->gi_frame;
- if (f == NULL || f->f_stacktop == NULL)
+ if (f == NULL || f->f_stacktop == NULL || f->f_iblock <= 0)
return 0; /* no frame or empty blockstack == no finalization */
/* Any block type besides a loop requires cleanup. */
- for (i = 0; i < f->f_iblock; i++)
+ i = f->f_iblock;
+ while (--i >= 0) {
if (f->f_blockstack[i].b_type != SETUP_LOOP)
return 1;
+ }
/* No blocks except loops, it's safe to skip finalization. */
return 0;
« no previous file with comments | « Objects/codeobject.c ('k') | Objects/stringlib/string_format.h » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+