Skip to content

Commit 50e5254

Browse files
committed
poll: drop compat flag as it does not make sense for watchers
1 parent ebf7e23 commit 50e5254

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

ext/standard/poll.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -457,20 +457,17 @@ PHP_METHOD(PollContext, __construct)
457457
zend_string *backend_str = NULL;
458458
bool compat = false;
459459

460-
ZEND_PARSE_PARAMETERS_START(0, 2)
460+
ZEND_PARSE_PARAMETERS_START(0, 1)
461461
Z_PARAM_OPTIONAL
462462
Z_PARAM_STR_OR_LONG(backend_str, backend_long)
463-
Z_PARAM_BOOL(compat)
464463
ZEND_PARSE_PARAMETERS_END();
465464

466465
php_poll_context_object *intern = PHP_POLL_CONTEXT_OBJ_FROM_ZV(getThis());
467466

468-
uint32_t flags = compat ? 0 : PHP_POLL_FLAG_RAW_EVENTS;
469-
470467
if (backend_str == NULL) {
471-
intern->ctx = php_poll_create((php_poll_backend_type) backend_long, flags);
468+
intern->ctx = php_poll_create((php_poll_backend_type) backend_long, 0);
472469
} else {
473-
intern->ctx = php_poll_create_by_name(ZSTR_VAL(backend_str), flags);
470+
intern->ctx = php_poll_create_by_name(ZSTR_VAL(backend_str), 0);
474471
}
475472

476473
if (!intern->ctx) {

ext/standard/poll.stub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function remove(): void {}
113113

114114
final class PollContext
115115
{
116-
public function __construct(int|string $backend = POLL_BACKEND_AUTO, bool $compat = false) {}
116+
public function __construct(int|string $backend = POLL_BACKEND_AUTO) {}
117117

118118
public function add(PollHandle $handle, int $events, mixed $data = null): PollWatcher {}
119119

ext/standard/poll_arginfo.h

Lines changed: 1 addition & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)