Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bb2769f

Browse files
committed
Revert use of METH_OLDARGS (use 0) to support 1.5.2
1 parent b82d34f commit bb2769f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Modules/_sre.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2938,8 +2938,10 @@ scanner_search(ScannerObject* self, PyObject* args)
29382938
}
29392939

29402940
static PyMethodDef scanner_methods[] = {
2941-
{"match", (PyCFunction) scanner_match, METH_OLDARGS},
2942-
{"search", (PyCFunction) scanner_search, METH_OLDARGS},
2941+
/* FIXME: use METH_OLDARGS instead of 0 or fix to use METH_VARARGS */
2942+
/* METH_OLDARGS is not in Python 1.5.2 */
2943+
{"match", (PyCFunction) scanner_match, 0},
2944+
{"search", (PyCFunction) scanner_search, 0},
29432945
{NULL, NULL}
29442946
};
29452947

0 commit comments

Comments
 (0)