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 mark.dickinson
Recipients CWRU_Researcher1, mark.dickinson
Date 2008-11-29.17:17:20
SpamBayes Score 1.5227666e-08
Marked as misclassified No
Message-id <1227979041.41.0.714939047061.issue4460@psf.upfronthosting.co.za>
In-reply-to
Content
I'm confused.  I'm probably missing something, but why do you think such a 
check is necessary?  The code I'm seeing at around line 2766 is:

static Py_ssize_t
match_getindex(MatchObject* self, PyObject* index)
{
    Py_ssize_t i;

    if (PyInt_Check(index))
        return PyInt_AsSsize_t(index);

...

Is there any reason to expect that the index argument to match_getindex 
might be NULL?  Even if it were, surely it would be the PyInt_Check call 
that would be affected, not PyInt_AsSsize_t?

The usual pattern in Python C code is to check return values, but not 
incoming arguments.
History
Date User Action Args
2008-11-29 17:17:21mark.dickinsonsetrecipients: + mark.dickinson, CWRU_Researcher1
2008-11-29 17:17:21mark.dickinsonsetmessageid: <1227979041.41.0.714939047061.issue4460@psf.upfronthosting.co.za>
2008-11-29 17:17:20mark.dickinsonlinkissue4460 messages
2008-11-29 17:17:20mark.dickinsoncreate