diff options
author | George Peter Banyard <girgias@php.net> | 2020-12-23 01:49:56 +0100 |
---|---|---|
committer | George Peter Banyard <girgias@php.net> | 2021-01-06 10:20:57 +0000 |
commit | 6728c1bd72f2ddb46528a0c61ac833b1036a12a2 (patch) | |
tree | c9be4bf024d5911bd6ed25819fac6c996caae5d4 | |
parent | ca5fcb83bfb54e930736f6fdf31ffbae6c479f78 (diff) | |
download | php-git-6728c1bd72f2ddb46528a0c61ac833b1036a12a2.tar.gz |
Formalize pdo_dbh_check_liveness_func() return type to zend_result
-rw-r--r-- | ext/pdo/php_pdo_driver.h | 2 | ||||
-rw-r--r-- | ext/pdo_mysql/mysql_driver.c | 2 | ||||
-rw-r--r-- | ext/pdo_oci/oci_driver.c | 2 | ||||
-rw-r--r-- | ext/pdo_pgsql/pgsql_driver.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 8345d7f81e..a8478cb3a6 100644 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -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 diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 830104952a..869f0ef441 100644 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -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; diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 18faa538b9..9cf894e9f2 100644 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -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; diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 3ae15e7511..62ad40c256 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -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) { |