fix master compatibility
[m6w6/ext-pq] / src / php_pqtxn.c
index 7b57ebf1e843c44e3312abbf4243f642f5f73bd7..70b7ec91d797ea5e10bff10d540d4963b4e82bb3 100644 (file)
@@ -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)