Repository navigation
Conversation
|
@cmb69 quick question, I see that I'm guessing if I do |
|
@Girgias, you can use #include "win32/time.h" |
84861ea to
e595ede
Compare
e595ede to
822dc1a
Compare
TimWolla
left a comment
There was a problem hiding this comment.
Overall this looks reasonable.
| } else if (usec >= 1000000) { | ||
| php_error_docref(NULL, E_WARNING, "must be less than 1000000"); | ||
| if (UNEXPECTED(EG(exception))) { | ||
| RETURN_THROWS(); | ||
| } |
There was a problem hiding this comment.
Can't this just be a zend_argument_value_error? We've shipped improved parameter validation all the time without an RFC and here the <0 case already throws.
There was a problem hiding this comment.
I don't know if people rely on passing a large int or not for the microseconds
| zend_argument_value_error(4, "must be greater than or equal to 0"); | ||
| RETURN_THROWS(); | ||
| } else if (usec < 0) { | ||
| zend_argument_value_error(5, "must be greater than or equal to 0"); |
There was a problem hiding this comment.
Could update the message to must be between 0 and 999999 to be consistent with stream_set_timeout.
|
|
||
| /* prepare the timeout value for use */ | ||
| struct timeval *tv_pointer; | ||
| if (timeout < 0.0 || timeout >= (double) PHP_TIMEOUT_ULL_MAX / 1000000.0) { |
There was a problem hiding this comment.
Do we no longer need the overflow check?
There was a problem hiding this comment.
We probably do, actually.
No description provided.