Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
38f425e4
Commit
38f425e4
authored
Jan 08, 2012
by
Charles-François Natali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #13739: It's simpler and more direct to call rewinddir() at the
beginning.
parent
7546ad32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Modules/posixmodule.c
Modules/posixmodule.c
+1
-2
No files found.
Modules/posixmodule.c
View file @
38f425e4
...
...
@@ -2890,6 +2890,7 @@ posix_fdlistdir(PyObject *self, PyObject *args)
close
(
fd
);
return
posix_error
();
}
rewinddir
(
dirp
);
if
((
d
=
PyList_New
(
0
))
==
NULL
)
{
Py_BEGIN_ALLOW_THREADS
closedir
(
dirp
);
...
...
@@ -2906,7 +2907,6 @@ posix_fdlistdir(PyObject *self, PyObject *args)
break
;
}
else
{
Py_BEGIN_ALLOW_THREADS
rewinddir
(
dirp
);
closedir
(
dirp
);
Py_END_ALLOW_THREADS
Py_DECREF
(
d
);
...
...
@@ -2930,7 +2930,6 @@ posix_fdlistdir(PyObject *self, PyObject *args)
Py_DECREF
(
v
);
}
Py_BEGIN_ALLOW_THREADS
rewinddir
(
dirp
);
closedir
(
dirp
);
Py_END_ALLOW_THREADS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment