Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4623)

#12720: Expose linux extended filesystem attributes

Can't Edit
Can't Publish+Mail
Start Review
Created:
1 year, 9 months ago by benjamin
Modified:
1 year, 9 months ago
Reviewers:
neologix, pitrou
CC:
AntoinePitrou, Benjamin Peterson, Arfrever.FTA_GMail.Com, skrah, Charles-François Natali, devnull_psf.upfronthosting.co.za, devnull_psf.upfronthosting.co.za
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Total comments: 7

Patch Set 3 #

Total comments: 11

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/os.rst View 7 chunks +148 lines, -0 lines 0 comments Download
Lib/test/test_os.py View 1 2 3 3 chunks +94 lines, -0 lines 0 comments Download
Modules/posixmodule.c View 1 2 3 4 chunks +404 lines, -0 lines 0 comments Download
configure View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
configure.in View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
pyconfig.h.in View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 5
neologix_free.fr
Here's a review. http://bugs.python.org/review/12720/diff/3188/9927 File Doc/library/os.rst (right): http://bugs.python.org/review/12720/diff/3188/9927#newcode1919 Doc/library/os.rst:1919: must be a bytes or str ...
1 year, 9 months ago #1
AntoinePitrou
http://bugs.python.org/review/12720/diff/3263/10150 File Modules/posixmodule.c (right): http://bugs.python.org/review/12720/diff/3263/10150#newcode9988 Modules/posixmodule.c:9988: _PyBytes_Resize(&value, len); You should return 0 if _PyBytes_Resize() fails. ...
1 year, 9 months ago #2
Benjamin Peterson
http://bugs.python.org/review/12720/diff/3263/10150 File Modules/posixmodule.c (right): http://bugs.python.org/review/12720/diff/3263/10150#newcode9988 Modules/posixmodule.c:9988: _PyBytes_Resize(&value, len); On 2011/08/28 18:34:13, AntoinePitrou wrote: > You ...
1 year, 9 months ago #3
neologix_free.fr
The FD -> char * cast is really ugly, and it's implementation-defined behavior. How about ...
1 year, 9 months ago #4
Benjamin Peterson
1 year, 9 months ago #5
http://bugs.python.org/review/12720/diff/3263/10150
File Modules/posixmodule.c (right):

http://bugs.python.org/review/12720/diff/3263/10150#newcode10002
Modules/posixmodule.c:10002: if (!try_getxattr(path, name, get, 128, &value))
On 2011/08/28 20:02:17, Charles-François Natali wrote:
> Don't you mean XATTR_BUF_SIZE instead of hard-coded 128?

Actually I meant to remove the XATTR_BUF_SIZE define.

http://bugs.python.org/review/12720/diff/3263/10150#newcode10068
Modules/posixmodule.c:10068: res = getxattr_common((const char *)fd, name,
wrap_fgetxattr);
On 2011/08/28 20:02:17, Charles-François Natali wrote:
> On 2011/08/28 18:34:13, AntoinePitrou wrote:
> > I'm no C lawyer, but maybe you should be casting to unsigned before casting
to
> a
> > pointer. Otherwise I don't know if there might be some sign extension.
> 
> Correct. But the problem is that this is really implementation behavior:
AFAICT,
> this could perfectly break on a specific platform/compiler. Plus, it's really
> ugly :-(

In my latest patch I have (const char *)(Py_uintptr_t)fd. Where is that
implementation defined?
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7