Skip to content

Use zend_enum_fetch_case_id() for poll API#22367

Open
iluuu1994 wants to merge 2 commits into
php:masterfrom
iluuu1994:poll-enum-case-id
Open

Use zend_enum_fetch_case_id() for poll API#22367
iluuu1994 wants to merge 2 commits into
php:masterfrom
iluuu1994:poll-enum-case-id

Conversation

@iluuu1994

Copy link
Copy Markdown
Member

@TimWolla Creating a PR for this one because the bit hacks are a bit more controversial. I can revert to a switch if preferred.

@TimWolla TimWolla left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the shifts and would suspect that compilers will be able to optimize a switch into shifts, but with the reference comments this okay.

Comment thread main/php_poll.h

/* Poll backend types */
/* Poll backend types. Keep in sync with io_poll.stub.php! */
typedef enum {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated, but this should also be named.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants