-
Notifications
You must be signed in to change notification settings - Fork 8k
ext/spl: refactor class autoloading to use newer FCC APIs #20841
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
base: master
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| zend_hash_next_index_insert_ptr(spl_autoload_functions, alfi); | ||
| zend_fcall_info_cache *entry = emalloc(sizeof(zend_fcall_info_cache)); |
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.
Could use zend_hash_next_index_insert_mem here
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 don't think this is correct, as I need to do a "deep" copy of the FCC by increasing refcounts rather than a shallow dup. Will add a comment to explain this.
Remove unused parameter Use zend_string_concat2() API Use size_t for ext_len parameter type Return bool instead of int
This is used only once anyway
9304196 to
cb596b2
Compare
Commits should be reviewed individually.
The primary motivation for me to introduce the newer FCC APIs was to make it easier to handle userland callables as the class autoloading system had a few bugs due to the complex semantics.
This is effectively taking the class autoloading part of #8294 as it is a straight-up code clarity improvement.