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

#21679: Prevent extraneous fstat during open()

Can't Edit
Can't Publish+Mail
Start Review
Created:
5 years, 4 months ago by slavek.kabrda
Modified:
5 years, 4 months ago
Reviewers:
pitrou, victor.stinner, ezio.melotti
CC:
AntoinePitrou, Benjamin Peterson, stutzbach, devnull_psf.upfronthosting.co.za, Martin Panter, storchaka, bkabrda, Josh.R
Visibility:
Public.

Patch Set 1 #

Total comments: 3

Patch Set 2 #

Total comments: 1

Patch Set 3 #

Total comments: 5

Patch Set 4 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_fileio.py View 1 2 3 2 chunks +9 lines, -1 line 0 comments Download
Modules/_io/fileio.c View 1 2 3 6 chunks +25 lines, -21 lines 0 comments Download
Modules/_io/_iomodule.c View 1 2 3 2 chunks +9 lines, -19 lines 0 comments Download

Messages

Total messages: 6
AntoinePitrou
Thank you for your patch! Here are a couple of comments. http://bugs.python.org/review/21679/diff/12060/Modules/_io/_iomodule.c File Modules/_io/_iomodule.c (right): ...
5 years, 4 months ago #1
AntoinePitrou
Hi, I've noticed another small potential issue, see below. http://bugs.python.org/review/21679/diff/12099/Modules/_io/fileio.c File Modules/_io/fileio.c (right): http://bugs.python.org/review/21679/diff/12099/Modules/_io/fileio.c#newcode424 Modules/_io/fileio.c:424: ...
5 years, 4 months ago #2
victor.stinner_gmail.com
http://bugs.python.org/review/21679/diff/12105/Modules/_io/fileio.c File Modules/_io/fileio.c (right): http://bugs.python.org/review/21679/diff/12105/Modules/_io/fileio.c#newcode56 Modules/_io/fileio.c:56: unsigned int blksize; stat.st_blksize type is blksize_t on Linux. ...
5 years, 4 months ago #3
bkabrda_redhat.com
http://bugs.python.org/review/21679/diff/12105/Modules/_io/fileio.c File Modules/_io/fileio.c (right): http://bugs.python.org/review/21679/diff/12105/Modules/_io/fileio.c#newcode56 Modules/_io/fileio.c:56: unsigned int blksize; On 2014/06/10 10:56:27, haypo wrote: > ...
5 years, 4 months ago #4
AntoinePitrou
Hmm, now that I think of it, it would be nice to add a small ...
5 years, 4 months ago #5
ezio.melotti
5 years, 4 months ago #6
On 2014/06/17 18:19:09, AntoinePitrou wrote:
> Hmm, now that I think of it, it would be nice to add a small test to
test_fileio
> for the private _blksize attribute (just test that it is equal to the file's
> st_blksize, I guess).
> 
> http://bugs.python.org/review/21679/diff/12105/Modules/_io/fileio.c
> File Modules/_io/fileio.c (right):
> 
>
http://bugs.python.org/review/21679/diff/12105/Modules/_io/fileio.c#newcode1222
> Modules/_io/fileio.c:1222: {"_blksize", T_INT, offsetof(fileio, blksize), 0},
> Ah, you should use T_UINT to match the blksize member definition.

Test message, please ignore.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+