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

Side by Side Diff: Objects/genobject.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
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 unified diff | Download patch
« no previous file with comments | « Objects/codeobject.c ('k') | Objects/stringlib/string_format.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Generator object implementation */ 1 /* Generator object implementation */
2 2
3 #include "Python.h" 3 #include "Python.h"
4 #include "frameobject.h" 4 #include "frameobject.h"
5 #include "structmember.h" 5 #include "structmember.h"
6 #include "opcode.h" 6 #include "opcode.h"
7 7
8 static int 8 static int
9 gen_traverse(PyGenObject *gen, visitproc visit, void *arg) 9 gen_traverse(PyGenObject *gen, visitproc visit, void *arg)
10 { 10 {
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 _PyObject_GC_TRACK(gen); 388 _PyObject_GC_TRACK(gen);
389 return (PyObject *)gen; 389 return (PyObject *)gen;
390 } 390 }
391 391
392 int 392 int
393 PyGen_NeedsFinalizing(PyGenObject *gen) 393 PyGen_NeedsFinalizing(PyGenObject *gen)
394 { 394 {
395 int i; 395 int i;
396 PyFrameObject *f = gen->gi_frame; 396 PyFrameObject *f = gen->gi_frame;
397 397
398 if (f == NULL || f->f_stacktop == NULL) 398 if (f == NULL || f->f_stacktop == NULL || f->f_iblock <= 0)
399 return 0; /* no frame or empty blockstack == no finalization */ 399 return 0; /* no frame or empty blockstack == no finalization */
400 400
401 /* Any block type besides a loop requires cleanup. */ 401 /* Any block type besides a loop requires cleanup. */
402 for (i = 0; i < f->f_iblock; i++) 402 i = f->f_iblock;
403 while (--i >= 0) {
403 if (f->f_blockstack[i].b_type != SETUP_LOOP) 404 if (f->f_blockstack[i].b_type != SETUP_LOOP)
404 return 1; 405 return 1;
406 }
405 407
406 /* No blocks except loops, it's safe to skip finalization. */ 408 /* No blocks except loops, it's safe to skip finalization. */
407 return 0; 409 return 0;
408 } 410 }
OLDNEW
« 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+