Skip to content

Fix GH-15893: Pdo\Pgsql backport fixes from GH-16124 - #16158

Merged
devnexen merged 3 commits into
php:masterfrom
devnexen:pdo_pgsql_iterable_fix
Oct 3, 2024
Merged

devnexen merged 3 commits into
php:masterfrom
devnexen:pdo_pgsql_iterable_fix

Conversation

@devnexen

@devnexen devnexen commented Oct 1, 2024

Copy link
Copy Markdown
Member

No description provided.

@ndossche

ndossche commented Oct 1, 2024

Copy link
Copy Markdown
Member

Hm you updated arginfo but I don't see stub changes?

@devnexen

devnexen commented Oct 1, 2024

Copy link
Copy Markdown
Member Author

that was a mistake..

RETURN_THROWS();
}

if (iter->funcs->rewind) {

Copy link
Copy Markdown
Member

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.

Copy link
Copy Markdown
Member

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 🤔

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

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.

@devnexen
devnexen force-pushed the pdo_pgsql_iterable_fix branch from 2bc53b4 to fd7cb52 Compare October 2, 2024 11:21

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

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

RETURN_THROWS();
}

if (iter->funcs->rewind) {

Copy link
Copy Markdown
Member

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 🤔

Comment thread ext/pdo_pgsql/pgsql_driver.c Outdated

Copy link
Copy Markdown
Member

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...

@devnexen
devnexen force-pushed the pdo_pgsql_iterable_fix branch from a275127 to d2a9918 Compare October 3, 2024 17:21

@ndossche ndossche left a comment

Copy link
Copy Markdown
Member

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)

@devnexen
devnexen merged commit dbcc77d into php:master Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants