summaryrefslogtreecommitdiff
path: root/ext/oci8
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
committerAnatol Belski <ab@php.net>2014-08-25 19:24:55 +0200
commitc3e3c98ec666812daaaca896cf5ef758a8a6df14 (patch)
treed82a76de5c8d117d1cf2dcca19bb30a283621870 /ext/oci8
parent0cf2dbdf58645b52cb6582b1b2571c5cd9e9e6b3 (diff)
downloadphp-git-c3e3c98ec666812daaaca896cf5ef758a8a6df14.tar.gz
master renames phase 1
Diffstat (limited to 'ext/oci8')
-rw-r--r--ext/oci8/oci8.c134
-rw-r--r--ext/oci8/oci8_interface.c38
-rw-r--r--ext/oci8/oci8_statement.c46
3 files changed, 109 insertions, 109 deletions
diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c
index 73f0c7f682..3c63692533 100644
--- a/ext/oci8/oci8.c
+++ b/ext/oci8/oci8.c
@@ -1207,92 +1207,92 @@ PHP_MINIT_FUNCTION(oci)
oci_coll_class_entry_ptr = zend_register_internal_class(&oci_coll_class_entry TSRMLS_CC);
/* thies@thieso.net 990203 i do not think that we will need all of them - just in here for completeness for now! */
- REGISTER_INT_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_SYSOPER",OCI_SYSOPER, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_SYSDBA",OCI_SYSDBA, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_CRED_EXT",PHP_OCI_CRED_EXT, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_DESCRIBE_ONLY",OCI_DESCRIBE_ONLY, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_COMMIT_ON_SUCCESS",OCI_COMMIT_ON_SUCCESS, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_NO_AUTO_COMMIT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_EXACT_FETCH",OCI_EXACT_FETCH, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_DEFAULT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_SYSOPER",OCI_SYSOPER, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_SYSDBA",OCI_SYSDBA, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_CRED_EXT",PHP_OCI_CRED_EXT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_DESCRIBE_ONLY",OCI_DESCRIBE_ONLY, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_COMMIT_ON_SUCCESS",OCI_COMMIT_ON_SUCCESS, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_NO_AUTO_COMMIT",OCI_DEFAULT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_EXACT_FETCH",OCI_EXACT_FETCH, CONST_CS | CONST_PERSISTENT);
/* for $LOB->seek() */
- REGISTER_INT_CONSTANT("OCI_SEEK_SET",PHP_OCI_SEEK_SET, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_SEEK_CUR",PHP_OCI_SEEK_CUR, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_SEEK_END",PHP_OCI_SEEK_END, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_SEEK_SET",PHP_OCI_SEEK_SET, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_SEEK_CUR",PHP_OCI_SEEK_CUR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_SEEK_END",PHP_OCI_SEEK_END, CONST_CS | CONST_PERSISTENT);
/* for $LOB->flush() */
- REGISTER_INT_CONSTANT("OCI_LOB_BUFFER_FREE",OCI_LOB_BUFFER_FREE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_LOB_BUFFER_FREE",OCI_LOB_BUFFER_FREE, CONST_CS | CONST_PERSISTENT);
/* for OCIBindByName (real "oci" names + short "php" names */
- REGISTER_INT_CONSTANT("SQLT_BFILEE",SQLT_BFILEE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_CFILEE",SQLT_CFILEE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_CLOB",SQLT_CLOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_BLOB",SQLT_BLOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_RDD",SQLT_RDD, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_INT",SQLT_INT, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_NUM",SQLT_NUM, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_RSET",SQLT_RSET, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_AFC",SQLT_AFC, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_CHR",SQLT_CHR, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_VCS",SQLT_VCS, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_AVC",SQLT_AVC, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_STR",SQLT_STR, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_LVC",SQLT_LVC, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_FLT",SQLT_FLT, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_UIN",SQLT_UIN, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_LNG",SQLT_LNG, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_LBI",SQLT_LBI, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_BIN",SQLT_BIN, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_ODT",SQLT_ODT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_BFILEE",SQLT_BFILEE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_CFILEE",SQLT_CFILEE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_CLOB",SQLT_CLOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_BLOB",SQLT_BLOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_RDD",SQLT_RDD, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_INT",SQLT_INT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_NUM",SQLT_NUM, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_RSET",SQLT_RSET, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_AFC",SQLT_AFC, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_CHR",SQLT_CHR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_VCS",SQLT_VCS, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_AVC",SQLT_AVC, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_STR",SQLT_STR, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_LVC",SQLT_LVC, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_FLT",SQLT_FLT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_UIN",SQLT_UIN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_LNG",SQLT_LNG, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_LBI",SQLT_LBI, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_BIN",SQLT_BIN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_ODT",SQLT_ODT, CONST_CS | CONST_PERSISTENT);
#if defined(HAVE_OCI_INSTANT_CLIENT) || (defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION >= 10)
- REGISTER_INT_CONSTANT("SQLT_BDOUBLE",SQLT_BDOUBLE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_BFLOAT",SQLT_BFLOAT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_BDOUBLE",SQLT_BDOUBLE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_BFLOAT",SQLT_BFLOAT, CONST_CS | CONST_PERSISTENT);
#endif
#if defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION >= 12
- REGISTER_INT_CONSTANT("SQLT_BOL",SQLT_BOL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_BOL",SQLT_BOL, CONST_CS | CONST_PERSISTENT);
#endif
- REGISTER_INT_CONSTANT("OCI_B_NTY",SQLT_NTY, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("SQLT_NTY",SQLT_NTY, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_NTY",SQLT_NTY, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("SQLT_NTY",SQLT_NTY, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("OCI_SYSDATE","SYSDATE", CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_BFILE",SQLT_BFILEE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_CFILEE",SQLT_CFILEE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_CLOB",SQLT_CLOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_BLOB",SQLT_BLOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_ROWID",SQLT_RDD, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_CURSOR",SQLT_RSET, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_BIN",SQLT_BIN, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_INT",SQLT_INT, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_B_NUM",SQLT_NUM, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_BFILE",SQLT_BFILEE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_CFILEE",SQLT_CFILEE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_CLOB",SQLT_CLOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_BLOB",SQLT_BLOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_ROWID",SQLT_RDD, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_CURSOR",SQLT_RSET, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_BIN",SQLT_BIN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_INT",SQLT_INT, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_NUM",SQLT_NUM, CONST_CS | CONST_PERSISTENT);
#if defined(OCI_MAJOR_VERSION) && OCI_MAJOR_VERSION >= 12
- REGISTER_INT_CONSTANT("OCI_B_BOL",SQLT_BOL, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_B_BOL",SQLT_BOL, CONST_CS | CONST_PERSISTENT);
#endif
/* for OCIFetchStatement */
- REGISTER_INT_CONSTANT("OCI_FETCHSTATEMENT_BY_COLUMN", PHP_OCI_FETCHSTATEMENT_BY_COLUMN, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_FETCHSTATEMENT_BY_ROW", PHP_OCI_FETCHSTATEMENT_BY_ROW, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_FETCHSTATEMENT_BY_COLUMN", PHP_OCI_FETCHSTATEMENT_BY_COLUMN, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_FETCHSTATEMENT_BY_ROW", PHP_OCI_FETCHSTATEMENT_BY_ROW, CONST_CS | CONST_PERSISTENT);
/* for OCIFetchInto & OCIResult */
- REGISTER_INT_CONSTANT("OCI_ASSOC",PHP_OCI_ASSOC, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_NUM",PHP_OCI_NUM, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_BOTH",PHP_OCI_BOTH, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_RETURN_NULLS",PHP_OCI_RETURN_NULLS, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_RETURN_LOBS",PHP_OCI_RETURN_LOBS, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_ASSOC",PHP_OCI_ASSOC, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_NUM",PHP_OCI_NUM, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_BOTH",PHP_OCI_BOTH, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_RETURN_NULLS",PHP_OCI_RETURN_NULLS, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_RETURN_LOBS",PHP_OCI_RETURN_LOBS, CONST_CS | CONST_PERSISTENT);
/* for OCINewDescriptor (real "oci" names + short "php" names */
- REGISTER_INT_CONSTANT("OCI_DTYPE_FILE",OCI_DTYPE_FILE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_DTYPE_LOB",OCI_DTYPE_LOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_DTYPE_ROWID",OCI_DTYPE_ROWID, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_DTYPE_FILE",OCI_DTYPE_FILE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_DTYPE_LOB",OCI_DTYPE_LOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_DTYPE_ROWID",OCI_DTYPE_ROWID, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_D_FILE",OCI_DTYPE_FILE, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_D_LOB",OCI_DTYPE_LOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_D_ROWID",OCI_DTYPE_ROWID, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_D_FILE",OCI_DTYPE_FILE, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_D_LOB",OCI_DTYPE_LOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_D_ROWID",OCI_DTYPE_ROWID, CONST_CS | CONST_PERSISTENT);
/* for OCIWriteTemporaryLob */
- REGISTER_INT_CONSTANT("OCI_TEMP_CLOB",OCI_TEMP_CLOB, CONST_CS | CONST_PERSISTENT);
- REGISTER_INT_CONSTANT("OCI_TEMP_BLOB",OCI_TEMP_BLOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_TEMP_CLOB",OCI_TEMP_CLOB, CONST_CS | CONST_PERSISTENT);
+ REGISTER_LONG_CONSTANT("OCI_TEMP_BLOB",OCI_TEMP_BLOB, CONST_CS | CONST_PERSISTENT);
return SUCCESS;
}
@@ -2090,7 +2090,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
if (alloc_non_persistent) {
connection = (php_oci_connection *) ecalloc(1, sizeof(php_oci_connection));
- connection->hash_key = zend_str_dup(hashed_details.s, 0);
+ connection->hash_key = zend_string_dup(hashed_details.s, 0);
connection->is_persistent = 0;
#ifdef HAVE_OCI8_DTRACE
connection->client_id = NULL;
@@ -2100,7 +2100,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
if (connection == NULL) {
return NULL;
}
- connection->hash_key = zend_str_dup(hashed_details.s, 1);
+ connection->hash_key = zend_string_dup(hashed_details.s, 1);
if (connection->hash_key == NULL) {
free(connection);
return NULL;
@@ -2112,7 +2112,7 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char
}
} else {
connection = (php_oci_connection *) ecalloc(1, sizeof(php_oci_connection));
- connection->hash_key = zend_str_dup(hashed_details.s, 0);
+ connection->hash_key = zend_string_dup(hashed_details.s, 0);
connection->is_persistent = 0;
#ifdef HAVE_OCI8_DTRACE
connection->client_id = NULL;
@@ -2791,7 +2791,7 @@ void php_oci_fetch_row (INTERNAL_FUNCTION_PARAMETERS, int mode, int expected_arg
/* 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_dtor(return_value);
- RETURN_INT(statement->ncolumns);
+ RETURN_LONG(statement->ncolumns);
}
}
/* }}} */
@@ -2849,7 +2849,7 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha
/* Populate key if passed */
if (hash_key->val) {
- session_pool->spool_hash_key = zend_str_dup(hash_key, 1);
+ session_pool->spool_hash_key = zend_string_dup(hash_key, 1);
if (session_pool->spool_hash_key == NULL) {
iserror = 1;
goto exit_create_spool;
diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c
index 985fd973c8..198493b946 100644
--- a/ext/oci8/oci8_interface.c
+++ b/ext/oci8/oci8_interface.c
@@ -402,7 +402,7 @@ PHP_FUNCTION(oci_lob_tell)
PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor);
- RETURN_INT(descriptor->lob_current_position);
+ RETURN_LONG(descriptor->lob_current_position);
}
/* }}} */
@@ -508,7 +508,7 @@ PHP_FUNCTION(oci_lob_size)
if (php_oci_lob_get_length(descriptor, &lob_length TSRMLS_CC)) {
RETURN_FALSE;
}
- RETURN_INT(lob_length);
+ RETURN_LONG(lob_length);
}
/* }}} */
@@ -550,13 +550,13 @@ PHP_FUNCTION(oci_lob_write)
PHP_OCI_ZVAL_TO_DESCRIPTOR(*tmp, descriptor);
if (data_len <= 0) {
- RETURN_INT(0);
+ RETURN_LONG(0);
}
if (php_oci_lob_write(descriptor, descriptor->lob_current_position, data, data_len, &bytes_written TSRMLS_CC)) {
RETURN_FALSE;
}
- RETURN_INT(bytes_written);
+ RETURN_LONG(bytes_written);
}
/* }}} */
@@ -689,7 +689,7 @@ PHP_FUNCTION(oci_lob_erase)
if (php_oci_lob_erase(descriptor, offset, length, &bytes_erased TSRMLS_CC)) {
RETURN_FALSE;
}
- RETURN_INT(bytes_erased);
+ RETURN_LONG(bytes_erased);
}
/* }}} */
@@ -1161,9 +1161,9 @@ PHP_FUNCTION(oci_field_size)
if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0) ) ) {
/* Handle data type of LONG */
if (column->data_type == SQLT_LNG){
- RETURN_INT(column->storage_size4);
+ RETURN_LONG(column->storage_size4);
}
- RETURN_INT(column->data_size);
+ RETURN_LONG(column->data_size);
}
RETURN_FALSE;
}
@@ -1176,7 +1176,7 @@ PHP_FUNCTION(oci_field_scale)
php_oci_out_column *column;
if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0) ) ) {
- RETURN_INT(column->scale);
+ RETURN_LONG(column->scale);
}
RETURN_FALSE;
}
@@ -1189,7 +1189,7 @@ PHP_FUNCTION(oci_field_precision)
php_oci_out_column *column;
if ( ( column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0) ) ) {
- RETURN_INT(column->precision);
+ RETURN_LONG(column->precision);
}
RETURN_FALSE;
}
@@ -1270,7 +1270,7 @@ PHP_FUNCTION(oci_field_type)
RETVAL_STRING("ROWID",1);
break;
default:
- RETVAL_INT(column->data_type);
+ RETVAL_LONG(column->data_type);
}
}
/* }}} */
@@ -1283,7 +1283,7 @@ PHP_FUNCTION(oci_field_type_raw)
column = php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0);
if (column) {
- RETURN_INT(column->data_type);
+ RETURN_LONG(column->data_type);
}
RETURN_FALSE;
}
@@ -1405,7 +1405,7 @@ PHP_FUNCTION(oci_fetch_all)
while (skip--) {
if (php_oci_statement_fetch(statement, nrows TSRMLS_CC)) {
- RETURN_INT(0);
+ RETURN_LONG(0);
}
}
@@ -1484,7 +1484,7 @@ PHP_FUNCTION(oci_fetch_all)
efree(outarrs);
}
- RETURN_INT(rows);
+ RETURN_LONG(rows);
}
/* }}} */
@@ -1659,11 +1659,11 @@ go_out:
if (errcode) {
array_init(return_value);
- add_assoc_int(return_value, "code", errcode);
+ add_assoc_long(return_value, "code", errcode);
// TODO: avoid reallocation ???
add_assoc_string(return_value, "message", (char*) errbuf);
efree(errbuf);
- add_assoc_int(return_value, "offset", error_offset);
+ add_assoc_long(return_value, "offset", error_offset);
add_assoc_string(return_value, "sqltext", sqltext ? (char *) sqltext : "");
} else {
RETURN_FALSE;
@@ -1684,7 +1684,7 @@ PHP_FUNCTION(oci_num_fields)
PHP_OCI_ZVAL_TO_STATEMENT(z_statement, statement);
- RETURN_INT(statement->ncolumns);
+ RETURN_LONG(statement->ncolumns);
}
/* }}} */
@@ -2156,7 +2156,7 @@ PHP_FUNCTION(oci_num_rows)
if (php_oci_statement_get_numrows(statement, &rowcount TSRMLS_CC)) {
RETURN_FALSE;
}
- RETURN_INT(rowcount);
+ RETURN_LONG(rowcount);
}
/* }}} */
@@ -2353,7 +2353,7 @@ PHP_FUNCTION(oci_collection_size)
if (php_oci_collection_size(collection, &size TSRMLS_CC)) {
RETURN_FALSE;
}
- RETURN_INT(size);
+ RETURN_LONG(size);
}
/* }}} */
@@ -2381,7 +2381,7 @@ PHP_FUNCTION(oci_collection_max)
if (php_oci_collection_max(collection, &max TSRMLS_CC)) {
RETURN_FALSE;
}
- RETURN_INT(max);
+ RETURN_LONG(max);
}
/* }}} */
diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c
index 16fe457433..415961d4ca 100644
--- a/ext/oci8/oci8_statement.c
+++ b/ext/oci8/oci8_statement.c
@@ -976,16 +976,16 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC)
zval_dtor(val);
ZVAL_NULL(val);
} else if (Z_TYPE_P(bind->zval) == IS_STRING
- && Z_STRSIZE_P(bind->zval) > 0
- && Z_STRVAL_P(bind->zval)[ Z_STRSIZE_P(bind->zval) ] != '\0') {
+ && Z_STRLEN_P(bind->zval) > 0
+ && Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(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_STRSIZE_P(bind->zval)+1);
- Z_STRVAL_P(bind->zval)[ Z_STRSIZE_P(bind->zval) ] = '\0';
+ 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) {
int i;
zval **entry;
@@ -1000,10 +1000,10 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC)
for (i = 0; i < bind->array.current_length; i++) {
if ((i < bind->array.old_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
zval_dtor(*entry);
- ZVAL_INT(*entry, ((ub4 *)(bind->array.elements))[i]);
+ ZVAL_LONG(*entry, ((ub4 *)(bind->array.elements))[i]);
zend_hash_move_forward(hash);
} else {
- add_next_index_int(bind->zval, ((ub4 *)(bind->array.elements))[i]);
+ add_next_index_long(bind->zval, ((ub4 *)(bind->array.elements))[i]);
}
}
break;
@@ -1144,7 +1144,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
return 1;
}
convert_to_int(var);
- bind_data = (ub4 *)&Z_IVAL_P(var);
+ bind_data = (ub4 *)&Z_LVAL_P(var);
value_sz = sizeof(ub4);
mode = OCI_DEFAULT;
break;
@@ -1162,7 +1162,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
convert_to_string(var);
}
if (maxlength == -1) {
- value_sz = (Z_TYPE_P(var) == IS_STRING) ? Z_STRSIZE_P(var) : 0;
+ value_sz = (Z_TYPE_P(var) == IS_STRING) ? Z_STRLEN_P(var) : 0;
} else {
value_sz = maxlength;
}
@@ -1190,7 +1190,7 @@ int php_oci_bind_by_name(php_oci_statement *statement, char *name, int name_len,
return 1;
}
convert_to_boolean(var);
- bind_data = (int *)&Z_IVAL_P(var);
+ bind_data = (int *)&Z_LVAL_P(var);
value_sz = sizeof(int);
mode = OCI_DEFAULT;
@@ -1332,7 +1332,7 @@ sb4 php_oci_bind_in_callback(
convert_to_string(val);
*bufpp = Z_STRVAL_P(val);
- *alenp = Z_STRSIZE_P(val);
+ *alenp = Z_STRLEN_P(val);
*indpp = (dvoid *)&phpbind->indicator;
} else if (phpbind->statement != 0) {
/* RSET */
@@ -1414,11 +1414,11 @@ sb4 php_oci_bind_out_callback(
convert_to_string(val);
zval_dtor(val);
- Z_STRSIZE_P(val) = PHP_OCI_PIECE_SIZE; /* 64K-1 is max XXX */
- Z_STRVAL_P(val) = ecalloc(1, Z_STRSIZE_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 we assume that zend-zval len has 4 bytes */
- *alenpp = (ub4*) &Z_STRSIZE_P(phpbind->zval);
+ *alenpp = (ub4*) &Z_STRLEN_P(phpbind->zval);
*bufpp = Z_STRVAL_P(phpbind->zval);
*piecep = OCI_ONE_PIECE;
*rcodepp = &phpbind->retcode;
@@ -1453,7 +1453,7 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
}
if (Z_TYPE_P(column_index) == IS_STRING) {
- column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), Z_STRSIZE_P(column_index) TSRMLS_CC);
+ column = php_oci_statement_get_column(statement, -1, Z_STRVAL_P(column_index), Z_STRLEN_P(column_index) TSRMLS_CC);
if (!column) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column name \"%s\"", Z_STRVAL_P(column_index));
return NULL;
@@ -1464,9 +1464,9 @@ php_oci_out_column *php_oci_statement_get_column_helper(INTERNAL_FUNCTION_PARAME
tmp = *column_index;
zval_copy_ctor(&tmp);
convert_to_int(&tmp);
- column = php_oci_statement_get_column(statement, Z_IVAL(tmp), NULL, 0 TSRMLS_CC);
+ column = php_oci_statement_get_column(statement, Z_LVAL(tmp), NULL, 0 TSRMLS_CC);
if (!column) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column index \"%ld\"", Z_IVAL(tmp));
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid column index \"%ld\"", Z_LVAL(tmp));
zval_dtor(&tmp);
return NULL;
}
@@ -1639,8 +1639,8 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, long max_table_length,
zend_hash_internal_pointer_reset(hash);
while (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE) {
convert_to_string_ex(entry);
- if (Z_STRSIZE_PP(entry) > maxlength) {
- maxlength = Z_STRSIZE_PP(entry) + 1;
+ if (Z_STRLEN_PP(entry) > maxlength) {
+ maxlength = Z_STRLEN_PP(entry) + 1;
}
zend_hash_move_forward(hash);
}
@@ -1662,8 +1662,8 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, long max_table_length,
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_STRSIZE_PP(entry);
- if (Z_STRSIZE_PP(entry) == 0) {
+ bind->array.element_lengths[i] = Z_STRLEN_PP(entry);
+ if (Z_STRLEN_PP(entry) == 0) {
bind->array.indicators[i] = -1;
}
zend_hash_move_forward(hash);
@@ -1678,7 +1678,7 @@ php_oci_bind *php_oci_bind_array_helper_string(zval *var, long max_table_length,
int element_length;
convert_to_string_ex(entry);
- element_length = (maxlength > Z_STRSIZE_PP(entry)) ? Z_STRSIZE_PP(entry) : maxlength;
+ element_length = (maxlength > Z_STRLEN_PP(entry)) ? Z_STRLEN_PP(entry) : maxlength;
memcpy((text *)bind->array.elements + i*maxlength, Z_STRVAL_PP(entry), element_length);
((text *)bind->array.elements)[i*maxlength + element_length] = '\0';
@@ -1721,7 +1721,7 @@ php_oci_bind *php_oci_bind_array_helper_number(zval *var, long max_table_length
}
if ((i < bind->array.current_length) && (zend_hash_get_current_data(hash, (void **) &entry) != FAILURE)) {
convert_to_int_ex(entry);
- ((ub4 *)bind->array.elements)[i] = (ub4) Z_IVAL_PP(entry);
+ ((ub4 *)bind->array.elements)[i] = (ub4) Z_LVAL_PP(entry);
zend_hash_move_forward(hash);
} else {
((ub4 *)bind->array.elements)[i] = 0;
@@ -1802,7 +1802,7 @@ php_oci_bind *php_oci_bind_array_helper_date(zval *var, long max_table_length, p
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_STRSIZE_PP(entry), NULL, 0, NULL, 0, &oci_date));
+ PHP_OCI_CALL_RETURN(errstatus, OCIDateFromText, (connection->err, (CONST text *)Z_STRVAL_PP(entry), Z_STRLEN_PP(entry), NULL, 0, NULL, 0, &oci_date));
if (errstatus != OCI_SUCCESS) {
/* failed to convert string to date */