Formalize pdo_dbh_check_liveness_func() return type to zend_result

This commit is contained in:
George Peter Banyard 2020-12-23 01:49:56 +01:00
parent ca5fcb83bf
commit 6728c1bd72
4 changed files with 4 additions and 4 deletions

View File

@ -265,7 +265,7 @@ typedef int (*pdo_dbh_get_attr_func)(pdo_dbh_t *dbh, zend_long attr, zval *val);
/* checking/pinging persistent connections; return SUCCESS if the connection
* is still alive and ready to be used, FAILURE otherwise.
* You may set this handler to NULL, which is equivalent to returning SUCCESS. */
typedef int (*pdo_dbh_check_liveness_func)(pdo_dbh_t *dbh);
typedef zend_result (*pdo_dbh_check_liveness_func)(pdo_dbh_t *dbh);
/* called at request end for each persistent dbh; this gives the driver
* the opportunity to safely release resources that only have per-request

View File

@ -520,7 +520,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
/* }}} */
/* {{{ pdo_mysql_check_liveness */
static int pdo_mysql_check_liveness(pdo_dbh_t *dbh)
static zend_result pdo_mysql_check_liveness(pdo_dbh_t *dbh)
{
pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data;

View File

@ -651,7 +651,7 @@ static int oci_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return
}
/* }}} */
static int pdo_oci_check_liveness(pdo_dbh_t *dbh) /* {{{ */
static zend_result pdo_oci_check_liveness(pdo_dbh_t *dbh) /* {{{ */
{
pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data;
sb4 error_code = 0;

View File

@ -488,7 +488,7 @@ static int pdo_pgsql_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *return_
}
/* {{{ */
static int pdo_pgsql_check_liveness(pdo_dbh_t *dbh)
static zend_result pdo_pgsql_check_liveness(pdo_dbh_t *dbh)
{
pdo_pgsql_db_handle *H = (pdo_pgsql_db_handle *)dbh->driver_data;
if (!PQconsumeInput(H->server) || PQstatus(H->server) == CONNECTION_BAD) {