summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c14
-rw-r--r--ext/oci8/oci8_collection.c2
-rw-r--r--ext/oci8/oci8_lob.c2
-rw-r--r--ext/oci8/oci8_statement.c8
4 files changed, 13 insertions, 13 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 8a26cf66ca..9d65685170 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -1456,7 +1456,7 @@ void php_oci_column_hash_dtor(zval *data)
if (GC_REFCOUNT(column->descid) == 1)
zend_list_close(column->descid);
else
- GC_REFCOUNT(column->descid)--;
+ GC_DELREF(column->descid);
}
if (column->data) {
@@ -1878,7 +1878,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
(memcmp(ZSTR_VAL(tmp->hash_key), ZSTR_VAL(hashed_details.s),
ZSTR_LEN(tmp->hash_key)) == 0)) {
connection = tmp;
- ++GC_REFCOUNT(connection->id);
+ GC_ADDREF(connection->id);
}
} else {
PHP_OCI_REGISTER_RESOURCE(connection, le_pconnection);
@@ -1888,7 +1888,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
* decremented in the persistent helper
*/
if (OCI_G(old_oci_close_semantics)) {
- ++GC_REFCOUNT(connection->id);
+ GC_ADDREF(connection->id);
}
}
smart_str_free(&hashed_details);
@@ -1899,7 +1899,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
} else {
/* we do not ping non-persistent connections */
smart_str_free(&hashed_details);
- ++GC_REFCOUNT(connection->id);
+ GC_ADDREF(connection->id);
return connection;
}
} /* is_open is true? */
@@ -2051,7 +2051,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
* refcount is decremented in the persistent helper
*/
if (OCI_G(old_oci_close_semantics)) {
- ++GC_REFCOUNT(connection->id);
+ GC_ADDREF(connection->id);
}
zend_hash_update_mem(&EG(persistent_list), connection->hash_key, (void *)&new_le, sizeof(zend_resource));
OCI_G(num_persistent)++;
@@ -2448,7 +2448,7 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */
ZVAL_RES(value, column->stmtid);
- ++GC_REFCOUNT(column->stmtid);
+ GC_ADDREF(column->stmtid);
} else if (column->is_descr) {
if (column->data_type != SQLT_RDD) {
@@ -2492,7 +2492,7 @@ int php_oci_column_to_zval(php_oci_out_column *column, zval *value, int mode)
/* return the locator */
object_init_ex(value, oci_lob_class_entry_ptr);
add_property_resource(value, "descriptor", column->descid);
- ++GC_REFCOUNT(column->descid);
+ GC_ADDREF(column->descid);
}
} else {
switch (column->retcode) {
diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c
index 9e0ea69120..83426e5975 100644
--- a/ext/oci8/oci8_collection.c
+++ b/ext/oci8/oci8_collection.c
@@ -52,7 +52,7 @@ php_oci_collection *php_oci_collection_create(php_oci_connection *connection, ch
collection->connection = connection;
collection->collection = NULL;
- ++GC_REFCOUNT(collection->connection->id);
+ GC_ADDREF(collection->connection->id);
/* get type handle by name */
PHP_OCI_CALL_RETURN(errstatus, OCITypeByName,
diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c
index 5e3107edfc..349338cf0f 100644
--- a/ext/oci8/oci8_lob.c
+++ b/ext/oci8/oci8_lob.c
@@ -67,7 +67,7 @@ php_oci_descriptor *php_oci_lob_create (php_oci_connection *connection, zend_lon
descriptor = ecalloc(1, sizeof(php_oci_descriptor));
descriptor->type = (ub4) type;
descriptor->connection = connection;
- ++GC_REFCOUNT(descriptor->connection->id);
+ GC_ADDREF(descriptor->connection->id);
PHP_OCI_CALL_RETURN(errstatus, OCIDescriptorAlloc, (connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 0, (dvoid **) 0));
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index f0cb16425a..1564e303e0 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -111,7 +111,7 @@ php_oci_statement *php_oci_statement_create(php_oci_connection *connection, char
statement->impres_child_stmt = NULL;
statement->impres_count = 0;
statement->impres_flag = PHP_OCI_IMPRES_UNKNOWN; /* may or may not have Implicit Result Set children */
- ++GC_REFCOUNT(statement->connection->id);
+ GC_ADDREF(statement->connection->id);
if (OCI_G(default_prefetch) >= 0) {
php_oci_statement_set_prefetch(statement, (ub4)OCI_G(default_prefetch));
@@ -171,8 +171,8 @@ php_oci_statement *php_oci_get_implicit_resultset(php_oci_statement *statement)
statement2->has_descr = 0;
statement2->stmttype = 0;
- GC_REFCOUNT(statement->id)++;
- GC_REFCOUNT(statement2->connection->id)++;
+ GC_ADDREF(statement->id);
+ GC_ADDREF(statement2->connection->id);
php_oci_statement_set_prefetch(statement2, statement->prefetch_count);
@@ -433,7 +433,7 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf
return OCI_ERROR;
}
nested_stmt->parent_stmtid = outcol->statement->id;
- ++GC_REFCOUNT(outcol->statement->id);
+ GC_ADDREF(outcol->statement->id);
outcol->nested_statement = nested_stmt;
outcol->stmtid = nested_stmt->id;