Skip to content

Commit 6728c1b

Browse files
committed
Formalize pdo_dbh_check_liveness_func() return type to zend_result
1 parent ca5fcb8 commit 6728c1b

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

ext/pdo/php_pdo_driver.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ typedef int (*pdo_dbh_get_attr_func)(pdo_dbh_t *dbh, zend_long attr, zval *val);
265265
/* checking/pinging persistent connections; return SUCCESS if the connection
266266
* is still alive and ready to be used, FAILURE otherwise.
267267
* You may set this handler to NULL, which is equivalent to returning SUCCESS. */
268-
typedef int (*pdo_dbh_check_liveness_func)(pdo_dbh_t *dbh);
268+
typedef zend_result (*pdo_dbh_check_liveness_func)(pdo_dbh_t *dbh);
269269

270270
/* called at request end for each persistent dbh; this gives the driver
271271
* the opportunity to safely release resources that only have per-request

ext/pdo_mysql/mysql_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
520520
/* }}} */
521521

522522
/* {{{ pdo_mysql_check_liveness */
523-
static int pdo_mysql_check_liveness(pdo_dbh_t *dbh)
523+
static zend_result pdo_mysql_check_liveness(pdo_dbh_t *dbh)
524524
{
525525
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;
526526

ext/pdo_oci/oci_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static int oci_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return
651651
}
652652
/* }}} */
653653

654-
static int pdo_oci_check_liveness(pdo_dbh_t *dbh) /* {{{ */
654+
static zend_result pdo_oci_check_liveness(pdo_dbh_t *dbh) /* {{{ */
655655
{
656656
pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;
657657
sb4 error_code = 0;

ext/pdo_pgsql/pgsql_driver.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ static int pdo_pgsql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
488488
}
489489

490490
/* {{{ */
491-
static int pdo_pgsql_check_liveness(pdo_dbh_t *dbh)
491+
static zend_result pdo_pgsql_check_liveness(pdo_dbh_t *dbh)
492492
{
493493
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
494494
if (!PQconsumeInput(H->server) || PQstatus(H->server) == CONNECTION_BAD) {

0 commit comments

Comments
 (0)