streams: Various minor refactorings#19106
Conversation
The flags variable is passed to the filter virtual function that requires an int
There was a problem hiding this comment.
Well, not checked by first party engine code, but sure
There was a problem hiding this comment.
Do you think this should just be removed then?
There was a problem hiding this comment.
One could wonder why the ZPP doesn't use Z_PARAM_ARRAY_HT_EX2 in the first place
There was a problem hiding this comment.
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.
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.
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.
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.
devnexen
left a comment
There was a problem hiding this comment.
As far as pgsql/socket go, lgtm but I like php_stream_cast return type better in this anyway.
The result of the functions returning those globals is never checked anyway
This only ever returned SUCCESS
Rather than casting to zend_long
cce84e7 to
0db4f60
Compare
| } | ||
|
|
||
| clisock = php_network_accept_incoming(sock->socket, | ||
| php_socket_t clisock = php_network_accept_incoming(sock->socket, |
There was a problem hiding this comment.
@Girgias This is a regression on Windows where error check no longer works. Please check carefully things and the whole context before changing the types. Also it would be good not to mix so many things together as it's pretty much impossible to catch this during the review. See GH-19798 and the fix in GH-19881 for more details.
Commits should be reviewed in order as they are meant to be independant.