-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix GH-15893: Pdo\Pgsql backport fixes from GH-16124 #16158
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
Hm you updated arginfo but I don't see stub changes? |
that was a mistake.. |
4fe0b0d
to
9051f5f
Compare
if (iter == NULL || EG(exception)) { | ||
RETURN_THROWS(); | ||
} | ||
|
||
if (iter->funcs->rewind) { |
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 think rewind can throw too, but the exception isn't checked in this case.
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.
Right, I forgot about that detail.
Maybe would be nice to have some FOREACH_ITERABLE macros 🤔
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 would prefer to change ZPP to fast ZPP so that you can use Z_PARAM_ITERABLE
here. As the type error message is not consistent with other TypeError messages atm.
2bc53b4
to
fd7cb52
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.
Other than the comment from Niels, LGTM
if (iter == NULL || EG(exception)) { | ||
RETURN_THROWS(); | ||
} | ||
|
||
if (iter->funcs->rewind) { |
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.
Right, I forgot about that detail.
Maybe would be nice to have some FOREACH_ITERABLE macros 🤔
ext/pdo_pgsql/pgsql_driver.c
Outdated
Z_PARAM_ITERABLE(pg_rows) | ||
Z_PARAM_OPTIONAL | ||
Z_PARAM_STRING(pg_delim, pg_delim_len) | ||
Z_PARAM_STRING_OR_NULL(pg_null_as, pg_null_as_len) |
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 the old zpp this argument was not nullable, it was the last one. The fact this is not caught in CI also means that this case is not tested...
a275127
to
d2a9918
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
Windows failure is unrelated (I already pinged Arnaud)
No description provided.