mercurial/osutil.c
changeset 18021 9b05b31b413c
parent 18019 e248bff2d8dd
child 18026 ddc0323db78b
equal deleted inserted replaced
18020:ec02eef0b686 18021:9b05b31b413c
   276 	return -1;
   276 	return -1;
   277 }
   277 }
   278 
   278 
   279 static PyObject *makestat(const struct stat *st)
   279 static PyObject *makestat(const struct stat *st)
   280 {
   280 {
   281         PyObject *stat;
   281 	PyObject *stat;
   282 
   282 
   283         stat = PyObject_CallObject((PyObject *)&listdir_stat_type, NULL);
   283 	stat = PyObject_CallObject((PyObject *)&listdir_stat_type, NULL);
   284         if (stat)
   284 	if (stat)
   285                 memcpy(&((struct listdir_stat *)stat)->st, st, sizeof(*st));
   285 		memcpy(&((struct listdir_stat *)stat)->st, st, sizeof(*st));
   286         return stat;
   286 	return stat;
   287 }
   287 }
   288 
   288 
   289 static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
   289 static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
   290 {
   290 {
   291 	PyObject *list, *elem, *stat, *ret = NULL;
   291 	PyObject *list, *elem, *stat, *ret = NULL;