-
Notifications
You must be signed in to change notification settings - Fork 7.9k
streams: Various minor refactorings #19106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
8a232b4
streams: add const specifier
Girgias 837ab97
streams: reduce scope of variables
Girgias 1847239
streams: use type bool instead of type int
Girgias b322edd
streams: use type zend_result instead of type int
Girgias 95c50e4
streams: use type size_t instead of type unsigned int
Girgias 663c67e
streams: use int type instead of long
Girgias 96299cc
streams: use precomputed persistant variable
Girgias 14ed8cf
streams: remove confusing step variable
Girgias ff8fa7a
streams: use -1 directly instead of FAILURE macro
Girgias 2772f73
streams: use call in if statement directly
Girgias a65efe3
streams: remove useless casts
Girgias f0f2a17
streams: refactor implementation of stream_select()
Girgias e0b4e2f
streams: use RETURN_BOOL() when possible
Girgias 59a9975
streams: voidify php_stream_filter_prepend_ex()
Girgias c0cacef
streams: drop unused includes
Girgias 37bfd3d
streams: use an enum for return type of _php_stream_make_seekable()
Girgias f16cf77
streams: use %zu printf specifier for size_t
Girgias 7af46fd
streams: use type php_socket_t instead of type int
Girgias 0db4f60
streams: refactor statbuf_from_array()
Girgias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could wonder why the ZPP doesn't use
Z_PARAM_ARRAY_HT_EX2
in the first placeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think because the parameter is a reference that is also written to, and so you need it to be a zval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a ref that is written to, but that doesn't mean it needs to be a zval?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I frankly never understand how PHP references are meant to work, and how to deal with them in functions.
Will try and see if I can just use
Z_PARAM_ARRAY_HT_EX2
directly :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really don't see how to handle the zval* being destroyed and reassigned to when using the HT directly, so I'll leave this for someone else to figure out.