if (!connection) {
RETURN_FALSE;
}
- RETURN_RESOURCE(connection->id);
+ RETURN_RES(connection->id);
}
/* }}} */
int type, link;
void *ptr;
- link = OCI8_PTR_TO_INT(le->ptr);
- ptr = zend_list_find(link, &type); /* PHPNG TODO */
- if (ptr && (type == le_connection)) {
+ ptr = le->ptr; /* PHPNG TODO */
+ if (ptr && (le->type == le_connection)) {
connection = (php_oci_connection *)ptr;
}
}
/* okay, the connection is open and the server is still alive */
connection->used_this_request = 1;
- tmp = (php_oci_connection *)zend_list_find(connection->id, &rsrc_type);
+ tmp = (php_oci_connection *)connection->id->ptr;
if (tmp != NULL && rsrc_type == le_pconnection && tmp->hash_key->len == hashed_details.s->len &&
- memcmp(tmp->hash_key->val, hashed_details.s->val, tmp->hash_key->len) == 0 && zend_list_addref(connection->id) == SUCCESS) {
+ memcmp(tmp->hash_key->val, hashed_details.s->val, tmp->hash_key->len) == 0 && Z_ADDREF_P(connection->id) == SUCCESS) {
/* do nothing */
} else {
PHP_OCI_REGISTER_RESOURCE(connection, le_pconnection);
* decremented in the persistent helper
*/
if (OCI_G(old_oci_close_semantics)) {
- zend_list_addref(connection->id);
+ Z_ADDREF_P(connection->id);
}
}
smart_str_free_ex(&hashed_details, 0);
} else {
/* we do not ping non-persistent connections */
smart_str_free_ex(&hashed_details, 0);
- zend_list_addref(connection->id);
+ Z_ADDREF_P(connection->id);
return connection;
}
} /* is_open is true? */
/* We have to do a hash_del but need to preserve the resource if there is a positive
* refcount. Set the data pointer in the list entry to NULL
*/
- if (connection == zend_list_find(connection->id, &rsrc_type) && rsrc_type == le_pconnection) {
+ if (connection == connection->id->ptr && rsrc_type == le_pconnection) {
le->ptr = NULL;
}
* refcount is decremented in the persistent helper
*/
if (OCI_G(old_oci_close_semantics)) {
- zend_list_addref(connection->id);
+ Z_ADDREF_P(connection->id);
}
zend_hash_update_mem(&EG(persistent_list), connection->hash_key, (void *)&new_le, sizeof(zend_resource));
OCI_G(num_persistent)++;
OCI_G(num_links)++;
} else if (!exclusive) {
PHP_OCI_REGISTER_RESOURCE(connection, le_connection);
- new_le.ptr = OCI8_INT_TO_PTR(connection->id);
+ new_le.ptr = connection->id;
new_le.type = le_index_ptr;
zend_hash_update_mem(&EG(regular_list), connection->hash_key, (void *)&new_le, sizeof(zend_resource));
OCI_G(num_links)++;
}
if (column->is_cursor) { /* REFCURSOR -> simply return the statement id */
- ZVAL_RESOURCE(value, column->stmtid);
- zend_list_addref(column->stmtid);
+ zend_register_resource(value, column->stmtid, 0 TSRMLS_CC); /* XXX type correct? */
+ Z_ADDREF_P(column->stmtid);
} else if (column->is_descr) {
if (column->data_type != SQLT_RDD) {
int rsrc_type;
/* reset descriptor's length */
- descriptor = (php_oci_descriptor *) zend_list_find(column->descid, &rsrc_type);
+ descriptor = (php_oci_descriptor *) column->descid->ptr;
if (!descriptor || rsrc_type != le_descriptor) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find LOB descriptor #%d", column->descid);
/* return the locator */
object_init_ex(value, oci_lob_class_entry_ptr);
add_property_resource(value, "descriptor", column->descid);
- zend_list_addref(column->descid);
+ Z_ADDREF_P(column->descid);
}
} else {
switch (column->retcode) {
}
if (!(column->indicator == -1)) {
- zval *element;
+ zval element;
- MAKE_STD_ZVAL(element);
- php_oci_column_to_zval(column, element, fetch_mode TSRMLS_CC);
+ php_oci_column_to_zval(column, &element, fetch_mode TSRMLS_CC);
if (fetch_mode & PHP_OCI_NUM || !(fetch_mode & PHP_OCI_ASSOC)) {
- add_index_zval(return_value, i, element);
+ add_index_zval(return_value, i, &element);
}
if (fetch_mode & PHP_OCI_ASSOC) {
if (fetch_mode & PHP_OCI_NUM) {
- Z_ADDREF_P(element);
+ Z_ADDREF(element);
}
- add_assoc_zval(return_value, column->name, element);
+ add_assoc_zval(return_value, column->name, &element);
}
} else {
if (expected_args > 2) {
/* Only for ocifetchinto BC. In all other cases we return array, not long */
- REPLACE_ZVAL_VALUE(&array, return_value, 1); /* copy return_value to given reference */
+ ZVAL_COPY_VALUE(&array, return_value); /* copy return_value to given reference */
zval_dtor(return_value);
RETURN_LONG(statement->ncolumns);
}
collection->connection = connection;
collection->collection = NULL;
- zend_list_addref(collection->connection->id);
+ Z_ADDREF_P(collection->connection->id);
/* get type handle by name */
PHP_OCI_CALL_RETURN(errstatus, OCITypeByName,
/* {{{ php_oci_collection_element_get()
Get the element with the given index */
-int php_oci_collection_element_get(php_oci_collection *collection, zend_long index, zval **result_element TSRMLS_DC)
+int php_oci_collection_element_get(php_oci_collection *collection, zend_long index, zval *result_element TSRMLS_DC)
{
php_oci_connection *connection = collection->connection;
dvoid *element;
ub4 buff_len = 1024;
sword errstatus;
- MAKE_STD_ZVAL(*result_element);
- ZVAL_NULL(*result_element);
+ ZVAL_NULL(result_element);
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- FREE_ZVAL(*result_element);
return 1;
}
if (exists == 0) {
/* element doesn't exist */
- FREE_ZVAL(*result_element);
return 1;
}
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- FREE_ZVAL(*result_element);
return 1;
}
- ZVAL_STRINGL(*result_element, (char *)buff, buff_len, 1);
- Z_STRVAL_P(*result_element)[buff_len] = '\0';
+ ZVAL_STRINGL(result_element, (char *)buff, buff_len, 1);
+ Z_STRVAL_P(result_element)[buff_len] = '\0';
return 0;
break;
PHP_OCI_CALL_RETURN(str, OCIStringPtr, (connection->env, oci_string));
if (str) {
- ZVAL_STRING(*result_element, (char *)str, 1);
+ ZVAL_STRING(result_element, (char *)str);
}
return 0;
}
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- FREE_ZVAL(*result_element);
return 1;
}
- ZVAL_DOUBLE(*result_element, double_number);
+ ZVAL_DOUBLE(result_element, double_number);
return 0;
}
break;
default:
php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unknown or unsupported type of element: %d", collection->element_typecode);
- FREE_ZVAL(*result_element);
return 1;
break;
}
define->name = (text*) estrndup(name, name_len);
define->name_len = name_len;
define->type = type;
- define->zval = var;
+ memmove(&define->zval, var, sizeof(zval));
zval_add_ref(&var);
RETURN_TRUE;
Fetch all rows of result data into an array */
PHP_FUNCTION(oci_fetch_all)
{
- zval *z_statement, *array, *element, *tmp;
+ zval *z_statement, *array;
+ zval element, tmp;
php_oci_statement *statement;
php_oci_out_column **columns;
zval ***outarrs;
}
while (!php_oci_statement_fetch(statement, nrows TSRMLS_CC)) {
- zval *row;
+ zval row;
- MAKE_STD_ZVAL(row);
- array_init(row);
+ array_init(&row);
for (i = 0; i < statement->ncolumns; i++) {
- MAKE_STD_ZVAL(element);
- php_oci_column_to_zval(columns[ i ], element, PHP_OCI_RETURN_LOBS TSRMLS_CC);
+ php_oci_column_to_zval(columns[ i ], &element, PHP_OCI_RETURN_LOBS TSRMLS_CC);
if (flags & PHP_OCI_NUM) {
- zend_hash_next_index_insert(Z_ARRVAL_P(row), &element, sizeof(zval*), NULL);
+ zend_hash_next_index_insert(Z_ARRVAL(row), &element, sizeof(zval*), NULL);
} else { /* default to ASSOC */
- zend_symtable_update(Z_ARRVAL_P(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL);
+ zend_symtable_update(Z_ARRVAL(row), columns[ i ]->name, columns[ i ]->name_len+1, &element, sizeof(zval*), NULL);
}
}
for (i = 0; i < statement->ncolumns; i++) {
columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC);
- MAKE_STD_ZVAL(tmp);
- array_init(tmp);
+ array_init(&tmp);
zend_hash_next_index_insert(Z_ARRVAL_P(array), &tmp, sizeof(zval*), (void **) &(outarrs[ i ]));
}
} else { /* default to ASSOC */
for (i = 0; i < statement->ncolumns; i++) {
columns[ i ] = php_oci_statement_get_column(statement, i + 1, NULL, 0 TSRMLS_CC);
- MAKE_STD_ZVAL(tmp);
- array_init(tmp);
+ array_init(&tmp);
zend_symtable_update(Z_ARRVAL_P(array), columns[ i ]->name, columns[ i ]->name_len+1, (void *) &tmp, sizeof(zval*), (void **) &(outarrs[ i ]));
}
}
while (!php_oci_statement_fetch(statement, nrows TSRMLS_CC)) {
for (i = 0; i < statement->ncolumns; i++) {
- MAKE_STD_ZVAL(element);
- php_oci_column_to_zval(columns[ i ], element, PHP_OCI_RETURN_LOBS TSRMLS_CC);
- zend_hash_index_update((*(outarrs[ i ]))->value.ht, rows, (void *)&element, sizeof(zval*), NULL);
+ php_oci_column_to_zval(columns[ i ], &element, PHP_OCI_RETURN_LOBS TSRMLS_CC);
+ zend_hash_index_update(&(*(outarrs[ i ]))->value.arr->ht, &rows, (void *)&element, sizeof(zval*), NULL);
}
rows++;
statement = php_oci_statement_create(connection, query, query_len TSRMLS_CC);
if (statement) {
- RETURN_RESOURCE(statement->id);
+ RETURN_RES(statement->id);
}
RETURN_FALSE;
}
if (!connection) {
RETURN_FALSE;
}
- RETURN_RESOURCE(connection->id);
+ RETURN_RES(connection->id);
}
WRONG_PARAM_COUNT;
}
statement = php_oci_statement_create(connection, NULL, 0 TSRMLS_CC);
if (statement) {
- RETURN_RESOURCE(statement->id);
+ RETURN_RES(statement->id);
}
RETURN_FALSE;
}
zval **tmp, *z_collection = getThis();
php_oci_collection *collection;
zend_long element_index;
- zval *value;
+ zval value;
if (getThis()) {
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &element_index) == FAILURE) {
RETURN_FALSE;
}
- *return_value = *value;
- zval_copy_ctor(return_value);
- zval_ptr_dtor(&value);
+ RETURN_ZVAL(&value, 1, 1);
}
/* }}} */
if (imp_statement) {
if (php_oci_statement_execute(imp_statement, (ub4)OCI_DEFAULT TSRMLS_CC))
RETURN_FALSE;
- RETURN_RESOURCE(imp_statement->id);
+ RETURN_RES(imp_statement->id);
}
RETURN_FALSE;
}
descriptor = ecalloc(1, sizeof(php_oci_descriptor));
descriptor->type = type;
descriptor->connection = connection;
- zend_list_addref(descriptor->connection->id);
+ Z_ADDREF_P(descriptor->connection->id);
PHP_OCI_CALL_RETURN(errstatus, OCIDescriptorAlloc, (connection->env, (dvoid*)&(descriptor->descriptor), descriptor->type, (size_t) 0, (dvoid **) 0));
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 */
- zend_list_addref(statement->connection->id);
+ Z_ADDREF_P(statement->connection->id);
if (OCI_G(default_prefetch) >= 0) {
php_oci_statement_set_prefetch(statement, (ub4)OCI_G(default_prefetch) TSRMLS_CC);
statement2->has_descr = 0;
statement2->stmttype = 0;
- zend_list_addref(statement->id);
- zend_list_addref(statement2->connection->id);
+ Z_ADDREF_P(statement->id);
+ Z_ADDREF_P(statement2->connection->id);
php_oci_statement_set_prefetch(statement2, statement->prefetch_count TSRMLS_CC);
continue;
}
- zval_dtor(column->define->zval);
- php_oci_column_to_zval(column, column->define->zval, 0 TSRMLS_CC);
+ zval_dtor(&column->define->zval);
+ php_oci_column_to_zval(column, &column->define->zval, 0 TSRMLS_CC);
}
return 0;
return OCI_ERROR;
}
nested_stmt->parent_stmtid = outcol->statement->id;
- zend_list_addref(outcol->statement->id);
+ Z_ADDREF_P(outcol->statement->id);
outcol->nested_statement = nested_stmt;
outcol->stmtid = nested_stmt->id;
*(int *)result = 0;
- if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
+ if (Z_TYPE(bind->zval) == IS_ARRAY) {
/* These checks are currently valid for oci_bind_by_name, not
* oci_bind_array_by_name. Also bind->type and
* bind->indicator are not used for oci_bind_array_by_name.
case SQLT_CLOB:
case SQLT_BLOB:
case SQLT_RDD:
- if (Z_TYPE_P(bind->zval) != IS_OBJECT) {
+ if (Z_TYPE(bind->zval) != IS_OBJECT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid variable used for bind");
*(int *)result = 1;
}
case SQLT_LBI:
case SQLT_BIN:
case SQLT_LNG:
- if (Z_TYPE_P(bind->zval) == IS_RESOURCE || Z_TYPE_P(bind->zval) == IS_OBJECT) {
+ if (Z_TYPE(bind->zval) == IS_RESOURCE || Z_TYPE(bind->zval) == IS_OBJECT) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid variable used for bind");
*(int *)result = 1;
}
break;
case SQLT_RSET:
- if (Z_TYPE_P(bind->zval) != IS_RESOURCE) {
+ if (Z_TYPE(bind->zval) != IS_RESOURCE) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid variable used for bind");
*(int *)result = 1;
}
sword errstatus;
if (bind->indicator == -1) { /* NULL */
- zval *val = bind->zval;
+ zval *val = &bind->zval;
if (Z_TYPE_P(val) == IS_STRING) {
*Z_STRVAL_P(val) = '\0'; /* XXX avoid warning in debug mode */
}
zval_dtor(val);
ZVAL_NULL(val);
- } else if (Z_TYPE_P(bind->zval) == IS_STRING
- && Z_STRLEN_P(bind->zval) > 0
- && Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] != '\0') {
+ } else if (Z_TYPE(bind->zval) == IS_STRING
+ && Z_STRLEN(bind->zval) > 0
+ && Z_STRVAL(bind->zval)[ Z_STRLEN(bind->zval) ] != '\0') {
/* The post- PHP 5.3 feature for "interned" strings disallows
* their reallocation but (i) any IN binds either interned or
* not should already be null terminated and (ii) for OUT
* binds, php_oci_bind_out_callback() should have allocated a
* new string that we can modify here.
*/
- Z_STRVAL_P(bind->zval) = erealloc(Z_STRVAL_P(bind->zval), Z_STRLEN_P(bind->zval)+1);
- Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0';
- } else if (Z_TYPE_P(bind->zval) == IS_ARRAY) {
+ Z_STR(bind->zval) = zend_string_realloc(Z_STR(bind->zval), Z_STRLEN(bind->zval)+1, 0);
+ Z_STRVAL(bind->zval)[ Z_STRLEN(bind->zval) ] = '\0';
+ } else if (Z_TYPE(bind->zval) == IS_ARRAY) {
int i;
zval **entry;
- HashTable *hash = HASH_OF(bind->zval);
+ HashTable *hash = HASH_OF(&bind->zval);
zend_hash_internal_pointer_reset(hash);
ZVAL_LONG(*entry, ((ub4 *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
} else {
- add_next_index_long(bind->zval, ((ub4 *)(bind->array.elements))[i]);
+ add_next_index_long(&bind->zval, ((ub4 *)(bind->array.elements))[i]);
}
}
break;
ZVAL_DOUBLE(*entry, ((double *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
} else {
- add_next_index_double(bind->zval, ((double *)(bind->array.elements))[i]);
+ add_next_index_double(&bind->zval, ((double *)(bind->array.elements))[i]);
}
}
break;
if (errstatus != OCI_SUCCESS) {
connection->errcode = php_oci_error(connection->err, errstatus TSRMLS_CC);
PHP_OCI_HANDLE_ERROR(connection, connection->errcode);
- add_next_index_null(bind->zval);
+ add_next_index_null(&bind->zval);
} else {
connection->errcode = 0; /* retain backwards compat with OCI8 1.4 */
- add_next_index_stringl(bind->zval, (char *)buff, buff_len);
+ add_next_index_stringl(&bind->zval, (char *)buff, buff_len);
}
}
}
int curr_element_length = bind->array.element_lengths[i];
if ((i < bind->array.old_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
zval_dtor(*entry);
- ZVAL_STRINGL(*entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length, 1);
+ ZVAL_STRINGL(*entry, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
zend_hash_move_forward(hash);
} else {
- add_next_index_stringl(bind->zval, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
+ add_next_index_stringl(&bind->zval, (char *)(((text *)bind->array.elements)+i*bind->array.max_length), curr_element_length);
}
}
break;
memset((void*)&bind,0,sizeof(php_oci_bind));
if (zend_hash_find(statement->binds, name, name_len + 1, (void **)&old_bind) == SUCCESS) {
bindp = old_bind;
- if (bindp->zval) {
- zval_ptr_dtor(&bindp->zval);
- }
+ zval_ptr_dtor(&bindp->zval);
} else {
zend_hash_update(statement->binds, name, name_len + 1, &bind, sizeof(php_oci_bind), (void **)&bindp);
}
bindp->descriptor = oci_desc;
bindp->statement = oci_stmt;
bindp->parent_statement = statement;
- bindp->zval = var;
+ ZVAL_COPY(&bindp->zval, var);
bindp->type = type;
zval_add_ref(&var);
zval *val;
TSRMLS_FETCH();
- if (!(phpbind=(php_oci_bind *)ictxp) || !(val = phpbind->zval)) {
+ if (!(phpbind=(php_oci_bind *)ictxp) || !(val = &phpbind->zval)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid phpbind pointer value");
return OCI_ERROR;
}
sb4 retval = OCI_ERROR;
TSRMLS_FETCH();
- if (!(phpbind=(php_oci_bind *)octxp) || !(val = phpbind->zval)) {
+ if (!(phpbind=(php_oci_bind *)octxp) || !(val = &phpbind->zval)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid phpbind pointer value");
return retval;
}
convert_to_string(val);
zval_dtor(val);
- Z_STRLEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
- Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(phpbind->zval) + 1);
-
+ //Z_STRLEN_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
+ //Z_STRVAL_P(val) = ecalloc(1, Z_STRLEN_P(phpbind->zval) + 1);
+ // XXX is this right?
+ ZVAL_STRINGL(val, NULL, Z_STRLEN(phpbind->zval) + 1);
+
/* XXX we assume that zend-zval len has 4 bytes */
- *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
- *bufpp = Z_STRVAL_P(phpbind->zval);
+ *alenpp = (ub4*) &Z_STRLEN(phpbind->zval);
+ *bufpp = Z_STRVAL(phpbind->zval);
*piecep = OCI_ONE_PIECE;
*rcodepp = &phpbind->retcode;
*indpp = &phpbind->indicator;
bindp->statement = NULL;
bindp->parent_statement = statement;
bindp->bind = NULL;
- bindp->zval = var;
+ ZVAL_COPY(&bindp->zval, var);
bindp->array.type = type;
bindp->indicator = 0; /* not used for array binds */
bindp->type = 0; /* not used for array binds */
php_oci_bind *bind;
ub4 i;
HashTable *hash;
- zval **entry;
+ zval *entry;
hash = HASH_OF(var);
zend_hash_internal_pointer_reset(hash);
while (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE) {
convert_to_string_ex(entry);
- if (Z_STRLEN_PP(entry) > maxlength) {
- maxlength = Z_STRLEN_PP(entry) + 1;
+ if (Z_STRLEN_P(entry) > maxlength) {
+ maxlength = Z_STRLEN_P(entry) + 1;
}
zend_hash_move_forward(hash);
}
for (i = 0; i < bind->array.current_length; i++) {
if (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE) {
convert_to_string_ex(entry);
- bind->array.element_lengths[i] = Z_STRLEN_PP(entry);
- if (Z_STRLEN_PP(entry) == 0) {
+ bind->array.element_lengths[i] = Z_STRLEN_P(entry);
+ if (Z_STRLEN_P(entry) == 0) {
bind->array.indicators[i] = -1;
}
zend_hash_move_forward(hash);
int element_length;
convert_to_string_ex(entry);
- element_length = (maxlength > Z_STRLEN_PP(entry)) ? Z_STRLEN_PP(entry) : maxlength;
+ element_length = (maxlength > Z_STRLEN_P(entry)) ? Z_STRLEN_P(entry) : maxlength;
- memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_PP(entry), element_length);
+ memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_P(entry), element_length);
((text *)bind->array.elements)[i*maxlength + element_length] = '\0';
zend_hash_move_forward(hash);
php_oci_bind *bind;
ub4 i;
HashTable *hash;
- zval **entry;
+ zval *entry;
hash = HASH_OF(var);
}
if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
convert_to_long_ex(entry);
- ((ub4 *)bind->array.elements)[i] = (ub4) Z_LVAL_PP(entry);
+ ((ub4 *)bind->array.elements)[i] = (ub4) Z_LVAL_P(entry);
zend_hash_move_forward(hash);
} else {
((ub4 *)bind->array.elements)[i] = 0;
php_oci_bind *bind;
ub4 i;
HashTable *hash;
- zval **entry;
+ zval *entry;
hash = HASH_OF(var);
}
if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
convert_to_double_ex(entry);
- ((double *)bind->array.elements)[i] = (double) Z_DVAL_PP(entry);
+ ((double *)bind->array.elements)[i] = (double) Z_DVAL_P(entry);
zend_hash_move_forward(hash);
} else {
((double *)bind->array.elements)[i] = 0;
php_oci_bind *bind;
ub4 i;
HashTable *hash;
- zval **entry;
+ zval *entry;
sword errstatus;
hash = HASH_OF(var);
if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
convert_to_string_ex(entry);
- PHP_OCI_CALL_RETURN(errstatus, OCIDateFromText, (connection->err, (CONST text *)Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, 0, NULL, 0, &oci_date));
+ PHP_OCI_CALL_RETURN(errstatus, OCIDateFromText, (connection->err, (CONST text *)Z_STRVAL_P(entry), Z_STRLEN_P(entry), NULL, 0, NULL, 0, &oci_date));
if (errstatus != OCI_SUCCESS) {
/* failed to convert string to date */
int php_oci_collection_max(php_oci_collection *collection, zend_long *max TSRMLS_DC);
int php_oci_collection_trim(php_oci_collection *collection, zend_long trim_size TSRMLS_DC);
int php_oci_collection_append(php_oci_collection *collection, char *element, int element_len TSRMLS_DC);
-int php_oci_collection_element_get(php_oci_collection *collection, zend_long index, zval **result_element TSRMLS_DC);
+int php_oci_collection_element_get(php_oci_collection *collection, zend_long index, zval *result_element TSRMLS_DC);
int php_oci_collection_element_set(php_oci_collection *collection, zend_long index, char *value, int value_len TSRMLS_DC);
int php_oci_collection_element_set_null(php_oci_collection *collection, zend_long index TSRMLS_DC);
int php_oci_collection_element_set_date(php_oci_collection *collection, zend_long index, char *date, int date_len TSRMLS_DC);