neil wrote: > Yup. I've attached a patch which I believe fixes some GC bugs in > addition to making it simpler. don't have the slightest idea how the GC stuff works, but it sure looks right: just go ahead and check it in... > > btw, the start of Resize looks a bit strange: should that > > DECREF really be there? should least be an XDECREF, or > > am I missing something? > > > > if (v == NULL || !PyTuple_Check(v) || v->ob_refcnt != 1) { > > *pv = 0; > > Py_DECREF(v); /* <- really? what if v is NULL? */ > > PyErr_BadInternalCall(); > > return -1; > > } > > I think your right. Here's a fun little program: > > from _tkinter import _flatten > import random # don't ask me why > for x in xrange(10000): > print x > t = _flatten([(0,)*x]*x) > > It gives: > > 0 > 1 > 2 > 3 > 4 > 5 > Segmentation fault guido? </F>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4