X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=src%2Fphp_pqtxn.c;h=ebcb44d806e7df3c25869dc0ae4d1592741a2b23;hp=7b57ebf1e843c44e3312abbf4243f642f5f73bd7;hb=d6c8226407001736e86b4e0328a224e2b6fd1aa3;hpb=8d0dbf7286d9132be18de64625837afa55409f84 diff --git a/src/php_pqtxn.c b/src/php_pqtxn.c index 7b57ebf..ebcb44d 100644 --- a/src/php_pqtxn.c +++ b/src/php_pqtxn.c @@ -58,7 +58,7 @@ static void php_pqtxn_object_free(zend_object *o) 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); @@ -140,7 +140,7 @@ static void php_pqtxn_object_write_isolation(zval *object, void *o, zval *value) if (res) { php_pqres_success(res); - php_pq_clear_res(res); + php_pqres_clear(res); } } @@ -157,7 +157,7 @@ static void php_pqtxn_object_write_readonly(zval *object, void *o, zval *value) if (res) { php_pqres_success(res); - php_pq_clear_res(res); + php_pqres_clear(res); } } @@ -174,7 +174,7 @@ static void php_pqtxn_object_write_deferrable(zval *object, void *o, zval *value if (res) { php_pqres_success(res); - php_pq_clear_res(res); + php_pqres_clear(res); } } @@ -271,7 +271,7 @@ static PHP_METHOD(pqtxn, savepoint) { throw_exce(EX_RUNTIME, "Failed to create %s (%s)", smart_str_v(&cmd), PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { php_pqres_success(res); - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -354,7 +354,7 @@ static PHP_METHOD(pqtxn, commit) { obj->intern->open = 0; } } - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -452,7 +452,7 @@ static PHP_METHOD(pqtxn, rollback) { obj->intern->open = 0; } } - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -534,7 +534,7 @@ static PHP_METHOD(pqtxn, exportSnapshot) { RETVAL_STRING(PQgetvalue(res, 0, 0)); } - php_pq_clear_res(res); + php_pqres_clear(res); } php_pqconn_notify_listeners(obj->intern->conn); @@ -605,7 +605,7 @@ static PHP_METHOD(pqtxn, importSnapshot) { throw_exce(EX_RUNTIME, "Failed to import transaction snapshot (%s)", PHP_PQerrorMessage(obj->intern->conn->intern->conn)); } else { php_pqres_success(res); - php_pq_clear_res(res); + php_pqres_clear(res); } smart_str_free(&cmd); @@ -843,7 +843,7 @@ static PHP_METHOD(pqtxn, exportLOB) { } static zend_function_entry php_pqtxn_methods[] = { - PHP_ME(pqtxn, __construct, ai_pqtxn_construct, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR) + PHP_ME(pqtxn, __construct, ai_pqtxn_construct, ZEND_ACC_PUBLIC) PHP_ME(pqtxn, commit, ai_pqtxn_commit, ZEND_ACC_PUBLIC) PHP_ME(pqtxn, rollback, ai_pqtxn_rollback, ZEND_ACC_PUBLIC) PHP_ME(pqtxn, commitAsync, ai_pqtxn_commit_async, ZEND_ACC_PUBLIC) @@ -883,7 +883,7 @@ PHP_MINIT_FUNCTION(pqtxn) php_pqtxn_object_handlers.read_property = php_pq_object_read_prop; php_pqtxn_object_handlers.write_property = php_pq_object_write_prop; php_pqtxn_object_handlers.clone_obj = NULL; - php_pqtxn_object_handlers.get_property_ptr_ptr = NULL; + php_pqtxn_object_handlers.get_property_ptr_ptr = php_pq_object_get_prop_ptr_null; php_pqtxn_object_handlers.get_gc = php_pq_object_get_gc; php_pqtxn_object_handlers.get_properties = php_pq_object_properties; php_pqtxn_object_handlers.get_debug_info = php_pq_object_debug_info;