X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqtxn.c;h=e90a2d8738313c6e4214eb808ab5c948c7d36d1b;hp=423026634fd2247607a344c12daa6ec6b546dc1e;hb=b2a9a9cf919161a26c419906a2b73500bd533f96;hpb=a06db6d217fc8ba0fd9b8273a9e595477d59afcc diff --git a/src/php_pqtxn.c b/src/php_pqtxn.c index 4230266..e90a2d8 100644 --- a/src/php_pqtxn.c +++ b/src/php_pqtxn.c @@ -58,7 +58,7 @@ static void php_pqtxn_object_free(void *o TSRMLS_DC) PGresult *res = php_pq_exec(obj->intern->conn->intern->conn, "ROLLBACK"); if (res) { - php_pq_clear_res(res); + php_pqres_clear(res); } } php_pq_object_delref(obj->intern->conn TSRMLS_CC); @@ -166,7 +166,7 @@ static void php_pqtxn_object_write_isolation(zval *object, void *o, zval *value if (res) { php_pqres_success(res TSRMLS_CC); - php_pq_clear_res(res); + php_pqres_clear(res); } } @@ -183,7 +183,7 @@ static void php_pqtxn_object_write_readonly(zval *object, void *o, zval *value T if (res) { php_pqres_success(res TSRMLS_CC); - php_pq_clear_res(res); + php_pqres_clear(res); } } @@ -200,7 +200,7 @@ static void php_pqtxn_object_write_deferrable(zval *object, void *o, zval *value if (res) { php_pqres_success(res TSRMLS_CC); - php_pq_clear_res(res); + php_pqres_clear(res); } } @@ -297,7 +297,7 @@ static PHP_METHOD(pqtxn, savepoint) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to create %s (%s)", cmd.c, PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { php_pqres_success(res TSRMLS_CC); - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -379,7 +379,7 @@ static PHP_METHOD(pqtxn, commit) { obj->intern->open = 0; } } - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -475,7 +475,7 @@ static PHP_METHOD(pqtxn, rollback) { obj->intern->open = 0; } } - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -556,7 +556,7 @@ static PHP_METHOD(pqtxn, exportSnapshot) { RETVAL_STRING(PQgetvalue(res, 0, 0), 1); } - php_pq_clear_res(res); + php_pqres_clear(res); } php_pqconn_notify_listeners(obj->intern->conn TSRMLS_CC); @@ -627,7 +627,7 @@ static PHP_METHOD(pqtxn, importSnapshot) { throw_exce(EX_RUNTIME TSRMLS_CC, "Failed to import transaction snapshot (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { php_pqres_success(res TSRMLS_CC); - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd);