mercurial/parsers.c
branchstable
changeset 23073 5715c93cb854
parent 22778 80f2b63dd83a
child 23087 42342f9afe01
equal deleted inserted replaced
23072:d583f1cfca96 23073:5715c93cb854
   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);