equal
deleted
inserted
replaced
871 } |
871 } |
872 |
872 |
873 return newlist; |
873 return newlist; |
874 } |
874 } |
875 |
875 |
876 static int check_filter(PyObject *filter, Py_ssize_t arg) { |
876 /* arg should be Py_ssize_t but Python 2.4 do not support the n format */ |
|
877 static int check_filter(PyObject *filter, unsigned long arg) { |
877 if (filter) { |
878 if (filter) { |
878 PyObject *arglist, *result; |
879 PyObject *arglist, *result; |
879 int isfiltered; |
880 int isfiltered; |
880 |
881 |
881 arglist = Py_BuildValue("(n)", arg); |
882 arglist = Py_BuildValue("(k)", arg); |
882 if (!arglist) { |
883 if (!arglist) { |
883 return -1; |
884 return -1; |
884 } |
885 } |
885 |
886 |
886 result = PyEval_CallObject(filter, arglist); |
887 result = PyEval_CallObject(filter, arglist); |