X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=src%2Fphp_pqstm.c;h=b82adcfbe96e4f17f144d8a76597f8d6364bb1a2;hb=1b5358df410e66224c7e8251d286134b0f3f59d3;hp=6d61a192c75abd8399be4f2ab224f04d298146fd;hpb=10e7d6adccdd55554f1512de5e829a75aef62461;p=m6w6%2Fext-pq diff --git a/src/php_pqstm.c b/src/php_pqstm.c index 6d61a19..b82adcf 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_pqres_clear(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_pqres_clear(res); php_pqconn_notify_listeners(obj->intern->conn TSRMLS_CC); } }