Alexander Belopolsky <[email protected]> added the comment:
On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson <[email protected]> wrote: >> - PyStructSequence_New does not fill ob_item array with NULLs. > > I'm not sure it really matters, since the fields should always be > filled in, but I suppose it can't hurt... The following pattern is quite common: tuple = PyTuple_New(size): for (i = 0; i < size; ++i) { item = create_item(...); if (item == NULL) goto fail; } ... fail: Py_DECREF(tuple); I don't think this should be outlawed. ---------- _______________________________________ Python tracker <[email protected]> <http://bugs.python.org/issue8413> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
