Iustin Pop [Tue, 15 May 2012 19:24:04 +0000 (21:24 +0200)]
Rework parsing of the namespace argument
In Python 3, we cannot accept (easily) bytes or None, so we have to
change how we accept the namespace argument.
Previously, if the argument was not passed or it was None, it was
considered missing. Since the None option is no longer possible, we
change it so that if not passed or passed as an empty string, it is
considered missing. This changes the behaviour somewhat, but I hope
that empty namespaces are not used (that's what I understand from
reading various pages on the internet).
Iustin Pop [Mon, 14 May 2012 20:32:07 +0000 (22:32 +0200)]
Fix bugs reported by cpychecker
Thanks to Dave Malcolm's cpychecker tool, this patch fixes a number of
serious issues. All issues that were not deemed false-positives were
fixed; some other issues in the same category that were found only by
a high number of refcount checks are also fixed (I should
split/simplify some parts of the code…).
Iustin Pop [Sun, 14 Dec 2008 20:12:43 +0000 (21:12 +0100)]
Fix a size_t/ssize_t mismatch
ACL library functions return a ssize_t, so all variables that hold
return values from such return types must be ssize_t, otherwise
comparisons with -1 will fail.
Iustin Pop [Sun, 14 Dec 2008 17:47:51 +0000 (18:47 +0100)]
Add python 3 support
This big patch does a few things (which are hard to split):
- uniformize all function w.r.t. the error exit path (all functions
now use only one exit point)
- move from 's' to 'et' format in ParseArgs so that we can accept both
binary and text, in both 2.x and 3.0
- update the unittest for py3k
Iustin Pop [Sun, 14 Dec 2008 17:46:01 +0000 (18:46 +0100)]
Initialize local variables
This patch prepares for the "et" format conversion by initializing the
local variables; it also adds a new "res" object for returns and adds a
few style fixes.
Iustin Pop [Sun, 14 Dec 2008 17:41:34 +0000 (18:41 +0100)]
Add a new field to the target_t structure
The patch extends the target_t structure with a new PyObject field and
adds a cleanup function for it. This field is needed for properly
handling unicode input arguments with Py3K.
Iustin Pop [Mon, 30 Jun 2008 19:17:08 +0000 (21:17 +0200)]
unittests: enhance symlink tests
The patch adds support for testing the behaviour of non-dangling
symlinks; we test that indeed attributes set on the target file are not
visible on the symlink when using nofollow.
Iustin Pop [Mon, 30 Jun 2008 05:16:53 +0000 (07:16 +0200)]
Implement changes needed for PEP 353 compliance
It seems the coded wrongly mixed ssize_t and ints in a couple of places,
plus not properly using Py_ssize_t as needed. Fix these and ensure
backwards compat with python 2.4.
Iustin Pop [Sun, 29 Jun 2008 21:26:10 +0000 (23:26 +0200)]
Change the match_ns function syntax
This patch changes the order of the two arguments and makes the function
return either NULL (failure) or a pointer to the (possibly shortened)
name, so that getting the short name is easier.
Iustin Pop [Sun, 29 Jun 2008 17:00:42 +0000 (19:00 +0200)]
Convert to object protocol
This patch changes the hardcoded if-then-else constructs for selecting
the type of function (file-descriptor, symlink, normal path) into a
generic framework.
Iustin Pop [Sun, 29 Jun 2008 08:20:59 +0000 (10:20 +0200)]
Docstring updates
This patch changes the docstring not to use tabs any longer (they make
pydoc output look not very nice) and changes the top-level example to
show that listxattr now returns a list not a tuple.
Iustin Pop [Sun, 9 Mar 2008 10:12:53 +0000 (11:12 +0100)]
Change return value of listxattr from tuple to list
A tuple doesn't make much sense - it was initially chosen because it a
tuple is read-only, but that is a bad reason to choose it. This patch
changes the return value to a list.
Iustin Pop [Sat, 11 Feb 2006 20:14:06 +0000 (20:14 +0000)]
* Fixed bug in dealing with symlinks (didn't work at all)
* Fixed possible memory leak if reading of EA failed but buffer
calculation didn't fail
* Added and fixed Makefile after switched to subversion