Message76607
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. |
|
Date |
User |
Action |
Args |
2008-11-29 17:17:21 | mark.dickinson | set | recipients:
+ mark.dickinson, CWRU_Researcher1 |
2008-11-29 17:17:21 | mark.dickinson | set | messageid: <1227979041.41.0.714939047061.issue4460@psf.upfronthosting.co.za> |
2008-11-29 17:17:20 | mark.dickinson | link | issue4460 messages |
2008-11-29 17:17:20 | mark.dickinson | create | |
|