diff options
Diffstat (limited to 'Modules')
| -rw-r--r-- | Modules/_sre.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index fb0ab03..d379363 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -2049,8 +2049,9 @@ match_getindex(MatchObject* self, PyObject* index) /* Default value */ return 0; - if (PyLong_Check(index)) - return PyLong_AsSsize_t(index); + if (PyIndex_Check(index)) { + return PyNumber_AsSsize_t(index, NULL); + } i = -1; |
