Index: Modules/posixmodule.c =================================================================== --- Modules/posixmodule.c £¨revision 74624£© +++ Modules/posixmodule.c £¨working copy£© @@ -1933,14 +1933,18 @@ posix_lchown(PyObject *self, PyObject *args) { char *path = NULL; - int uid, gid; + long uid_arg, gid_arg; + uid_t uid; + gid_t gid; int res; if (!PyArg_ParseTuple(args, "etii:lchown", Py_FileSystemDefaultEncoding, &path, - &uid, &gid)) + &uid_arg, &gid_arg)) return NULL; + uid = uid_arg; + gid = gid_arg; Py_BEGIN_ALLOW_THREADS - res = lchown(path, (uid_t) uid, (gid_t) gid); + res = lchown(path, uid, gid); Py_END_ALLOW_THREADS if (res < 0) return posix_error_with_allocated_filename(path);