Skip to content

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented May 28, 2025

There are better ways of handling this than casting the zval in place


c = PQgetCancel(pgsql);
RETVAL_LONG((rc = PQcancel(c, err, sizeof(err))));
rc = PQcancel(c, err, sizeof(err);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once you fixed this little typo, I ll have a better look ; seems ok at first glance.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should not be using PQCancel any longer? https://www.postgresql.org/docs/current/libpq-cancel.html#LIBPQ-PQCANCEL

Also it can only ever return 0 or 1, so the rc < 0 check is... wrong

There are better ways of handling this than casting the zval in place
@Girgias Girgias force-pushed the pgsql-convert-bool branch from 872e404 to e3ea426 Compare May 29, 2025 15:09
@Girgias Girgias merged commit 0cdd3c3 into php:master May 29, 2025
9 checks passed
@Girgias Girgias deleted the pgsql-convert-bool branch May 29, 2025 18:09
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.

2 participants