From 8aa6fd8177b9af8d16c69dc0bd8e3b189aeb799b Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 30 Jun 2008 08:06:00 +0200 Subject: [PATCH] More PEP 353 compliancy (new-style functions) --- xattr.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/xattr.c b/xattr.c index 7cfa8dc..73f2e55 100644 --- a/xattr.c +++ b/xattr.c @@ -84,8 +84,7 @@ static ssize_t _get_obj(target_t *tgt, const char *name, void *value, } static int _set_obj(target_t *tgt, const char *name, - const void *value, size_t size, - int flags) { + const void *value, size_t size, int flags) { if(tgt->type == T_FD) return fsetxattr(tgt->fd, name, value, size, flags); else if (tgt->type == T_LINK) @@ -217,7 +216,7 @@ xattr_get(PyObject *self, PyObject *args, PyObject *keywds) const char *fullname; char *buf; char *ns = NULL; - int nalloc, nret; + ssize_t nalloc, nret; PyObject *res; static char *kwlist[] = {"item", "name", "nofollow", "namespace", NULL}; @@ -493,7 +492,8 @@ xattr_set(PyObject *self, PyObject *args, PyObject *keywds) int nofollow=0; char *attrname; char *buf; - int bufsize, nret; + Py_ssize_t bufsize; + int nret; int flags = 0; target_t tgt; char *ns = NULL; @@ -725,11 +725,11 @@ xattr_list(PyObject *self, PyObject *args, PyObject *keywds) { char *buf; int nofollow=0; - int nalloc, nret; + ssize_t nalloc, nret; PyObject *myarg; PyObject *mylist; char *ns = NULL; - int nattrs; + Py_ssize_t nattrs; char *s; target_t tgt; static char *kwlist[] = {"item", "nofollow", "namespace", NULL}; -- 2.39.5