File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3332,14 +3332,14 @@ loop_subscript(PyObject *v, PyObject *w)
33323332 Silently reduce values larger than INT_MAX to INT_MAX, and silently
33333333 boost values less than -INT_MAX to 0. Return 0 on error, 1 on success.
33343334*/
3335- /* XXX If v is NULL, this goes out of its way to indicate success(!), but
3336- XXX doesn't store into *pi. Why isn't that an error, or at least v!=NULL
3337- XXX an asserted precondition?
3335+ /* Note: If v is NULL, return success without storing into *pi. This
3336+ is because_PyEval_SliceIndex() is called by apply_slice(), which can be
3337+ called by the SLICE opcode with v and/or w equal to NULL.
33383338*/
33393339int
33403340_PyEval_SliceIndex (PyObject * v , int * pi )
33413341{
3342- if (v != NULL ) { /* XXX why isn't this assert(v != NULL()? */
3342+ if (v != NULL ) {
33433343 long x ;
33443344 if (PyInt_Check (v )) {
33453345 x = PyInt_AsLong (v );
You can’t perform that action at this time.
0 commit comments