This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients Arfrever, belopolsky, benjamin.peterson, eric.smith, ezio.melotti, pitrou, rhettinger
Date 2010-07-07.20:28:03
SpamBayes Score 0.0030747682
Marked as misclassified No
Message-id <AANLkTil88ftREtVkPfQA0hfK-V_ORyRg21uvsfbI8hVJ@mail.gmail.com>
In-reply-to <AANLkTimOhbjZzXjIHjkvV5dGokrYjRj9N9cXk8feQkT7@mail.gmail.com>
Content
On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson
<report@bugs.python.org> 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.
History
Date User Action Args
2010-07-07 20:28:05belopolskysetrecipients: + belopolsky, rhettinger, pitrou, eric.smith, benjamin.peterson, ezio.melotti, Arfrever
2010-07-07 20:28:03belopolskylinkissue8413 messages
2010-07-07 20:28:03belopolskycreate