X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqtypes.c;h=25cdc1e7a546fefe5c133e31a0831e85865700fb;hb=eae24685735de58732c1de8cde21457f504ad98f;hp=8f4b53d697af6e1e36fee0a4b205864489549193;hpb=94be2af75078af30116718bb2df201d9e5a47e5b;p=m6w6%2Fext-pq diff --git a/src/php_pqtypes.c b/src/php_pqtypes.c index 8f4b53d..25cdc1e 100644 --- a/src/php_pqtypes.c +++ b/src/php_pqtypes.c @@ -189,7 +189,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtypes, __construct) { zend_error_handling zeh; zval *zconn, *znsp = NULL; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|a!", &zconn, php_pqconn_class_entry, &znsp); @@ -260,7 +260,7 @@ ZEND_END_ARG_INFO(); static PHP_METHOD(pqtypes, refresh) { HashTable *nsp = NULL; zend_error_handling zeh; - STATUS rv; + ZEND_RESULT_CODE rv; zend_replace_error_handling(EH_THROW, exce(EX_INVALID_ARGUMENT), &zeh TSRMLS_CC); rv = zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|H/!", &nsp); @@ -275,7 +275,7 @@ static PHP_METHOD(pqtypes, refresh) { PGresult *res; if (!nsp || !zend_hash_num_elements(nsp)) { - res = PQexec(obj->intern->conn->intern->conn, PHP_PQ_TYPES_QUERY " and nspname in ('public', 'pg_catalog')"); + res = php_pq_exec(obj->intern->conn->intern->conn, PHP_PQ_TYPES_QUERY " and nspname in ('public', 'pg_catalog')"); } else { smart_str str = {0}; php_pq_params_t *params = php_pq_params_init(&obj->intern->conn->intern->converters, NULL, NULL TSRMLS_CC); @@ -285,7 +285,7 @@ static PHP_METHOD(pqtypes, refresh) { smart_str_appendc(&str, ')'); smart_str_0(&str); - res = PQexecParams(obj->intern->conn->intern->conn, str.c, params->param.count, params->type.oids, (const char *const*) params->param.strings, NULL, NULL, 0); + res = php_pq_exec_params(obj->intern->conn->intern->conn, str.c, params->param.count, params->type.oids, (const char *const*) params->param.strings, NULL, NULL, 0); smart_str_free(&str); php_pq_params_free(¶ms); @@ -309,7 +309,7 @@ static PHP_METHOD(pqtypes, refresh) { } } - PHP_PQclear(res); + php_pqres_clear(res); php_pqconn_notify_listeners(obj->intern->conn TSRMLS_CC); } }