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=e075860193d97f249ac12ebae8f29482ff7473d2;hp=6d61a192c75abd8399be4f2ab224f04d298146fd;hb=a06db6d217fc8ba0fd9b8273a9e595477d59afcc;hpb=0d8fc412a6fdd65f6bc89ae77b132ca119e00c6c diff --git a/src/php_pqstm.c b/src/php_pqstm.c index 6d61a19..e075860 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, cmd.c))) { - PHP_PQclear(res); + if ((res = php_pq_exec(obj->intern->conn->intern->conn, cmd.c))) { + php_pq_clear_res(res); } else if (!silent) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to deallocate statement (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } @@ -262,7 +262,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) { @@ -350,7 +350,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 TSRMLS_CC); } }