-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ext/sqlite3: Use new F ZPP modifier #14040
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
Conversation
ZEND_PARSE_PARAMETERS_END(); | ||
|
||
SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) | ||
SQLITE3_CHECK_INITIALIZED_FREE_TRAMPOLINE(db_obj, db_obj->initialised, SQLite3, &fcc); |
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.
Does it need to check if the callback is passed null?
ext/sqlite3/sqlite3.c
Outdated
if (ZEND_FCC_INITIALIZED(step_fcc)) { | ||
zend_release_fcall_info_cache(&step_fcc); | ||
} | ||
if (ZEND_FCC_INITIALIZED(fini_fcc)) { | ||
zend_release_fcall_info_cache(&fini_fcc); | ||
} |
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.
ZEND_FCC_INITIALIZED
is redundant because zend_release_fcall_info_cache
is doing almost the same thing as checking ZEND_FCC_INITIALIZED
.
Also, in cases like createAggregate(null, null, null)
, there is a possibility that uninitialized members (step_fcc.function_handler
, fini_fcc.function_handler
) may be accessed, so it may be a good idea to set them to NULL
in advance.
(In a follow-up PR for pdo_sqlite, I ran into this problem in the release build)
No description provided.