X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqstm.c;fp=src%2Fphp_pqstm.c;h=fbab27e81037f9fe4d0f344b1669493da6086fb3;hp=dff5375d973e61f5b40b1ac29190537e06e01279;hb=8d0dbf7286d9132be18de64625837afa55409f84;hpb=7588300a5fb0ed9dcc8cf534f0e5ffa94b07c7e4 diff --git a/src/php_pqstm.c b/src/php_pqstm.c index dff5375..fbab27e 100644 --- a/src/php_pqstm.c +++ b/src/php_pqstm.c @@ -51,8 +51,8 @@ static void php_pqstm_deallocate(php_pqstm_object_t *obj, zend_bool async, zend_ } else { PGresult *res; - if ((res = PQexec(obj->intern->conn->intern->conn, smart_str_v(&cmd)))) { - PHP_PQclear(res); + if ((res = php_pq_exec(obj->intern->conn->intern->conn, smart_str_v(&cmd)))) { + php_pq_clear_res(res); } else if (!silent) { throw_exce(EX_RUNTIME, "Failed to deallocate statement (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } @@ -252,7 +252,7 @@ static PHP_METHOD(pqstm, exec) { PGresult *res; php_pq_params_set_params(obj->intern->params, zparams ? Z_ARRVAL_P(zparams) : &obj->intern->bound); - res = PQexecPrepared(obj->intern->conn->intern->conn, obj->intern->name, obj->intern->params->param.count, (const char *const*) obj->intern->params->param.strings, NULL, NULL, 0); + res = php_pq_exec_prepared(obj->intern->conn->intern->conn, obj->intern->name, obj->intern->params->param.count, (const char *const*) obj->intern->params->param.strings, NULL, NULL, 0); php_pq_params_set_params(obj->intern->params, NULL); if (!res) { @@ -340,7 +340,7 @@ static PHP_METHOD(pqstm, desc) { add_next_index_long(return_value, PQparamtype(res, p)); } } - PHP_PQclear(res); + php_pq_clear_res(res); php_pqconn_notify_listeners(obj->intern->conn); } }