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
ext/curl: Refactor cURL to only use FCC #13291
Conversation
69a9320
to
294aed3
Compare
294aed3
to
2d54d26
Compare
2d54d26
to
724a2d9
Compare
724a2d9
to
c0b5fd9
Compare
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.
Two minor comments otherwise looks good
efree(mh->handlers.server_push); | ||
|
||
if (ZEND_FCC_INITIALIZED(mh->handlers.server_push)) { | ||
zend_fcc_dtor(&mh->handlers.server_push); |
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.
In other places you set it then to the empty fcc, did you forget to do that here?
case CURLMOPT_PUSHFUNCTION: { | ||
/* See php_curl_set_callable_handler */ | ||
if (ZEND_FCC_INITIALIZED(mh->handlers.server_push)) { | ||
zend_fcc_dtor(&mh->handlers.server_push); |
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.
Should this be set to the empty fcc?
c0b5fd9
to
9ad63b1
Compare
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.
LGTM! Thanks!
Only 2 remarks I have is one that I wrote in the comment, and one that I told you already: zend_fcc_dtor actually does set the fcc to empty, so manually overwriting to empty is not necessary (Sorry!).
TODO Tests for multi handler
9ad63b1
to
431d24a
Compare
Refactor cURL options that use callables to check them on assignment and use the standard FCC instead of its custom struct.