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
c7a22703
Commit
c7a22703
authored
Nov 01, 1993
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* selectmodule.c (select_select): timeout argument may be None with same
meaning as no 4th argument
parent
82d410e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
Modules/selectmodule.c
Modules/selectmodule.c
+12
-6
No files found.
Modules/selectmodule.c
View file @
c7a22703
...
...
@@ -114,7 +114,7 @@ select_select(self, args)
{
object
*
fd2obj
[
FD_SETSIZE
];
object
*
ifdlist
,
*
ofdlist
,
*
efdlist
;
object
*
ret
;
object
*
ret
,
*
tout
;
fd_set
ifdset
,
ofdset
,
efdset
;
double
timeout
;
struct
timeval
tv
,
*
tvp
;
...
...
@@ -124,12 +124,18 @@ select_select(self, args)
/* Get args. Looks funny because of optional timeout argument */
if
(
getargs
(
args
,
"(OOO
d)"
,
&
ifdlist
,
&
ofdlist
,
&
efdlist
,
&
time
out
)
)
{
if
(
getargs
(
args
,
"(OOO
O)"
,
&
ifdlist
,
&
ofdlist
,
&
efdlist
,
&
t
out
)
)
{
seconds
=
(
int
)
timeout
;
timeout
=
timeout
-
(
double
)
seconds
;
tv
.
tv_sec
=
seconds
;
tv
.
tv_usec
=
(
int
)(
timeout
*
1000000
.
0
);
tvp
=
&
tv
;
if
(
tout
==
None
)
tvp
=
(
struct
timeval
*
)
0
;
else
{
if
(
!
getargs
(
tout
,
"%d;timeout must be float or None"
,
&
timeout
))
return
NULL
;
timeout
=
timeout
-
(
double
)
seconds
;
tv
.
tv_sec
=
seconds
;
tv
.
tv_usec
=
(
int
)(
timeout
*
1000000
.
0
);
tvp
=
&
tv
;
}
}
else
{
/* Doesn't have 4 args, that means no timeout */
err_clear
();
...
...
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