summaryrefslogtreecommitdiff
path: root/ext/pdo_firebird/firebird_statement.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_firebird/firebird_statement.c')
-rw-r--r--ext/pdo_firebird/firebird_statement.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c
index bf6431c09e..d46a67d504 100644
--- a/ext/pdo_firebird/firebird_statement.c
+++ b/ext/pdo_firebird/firebird_statement.c
@@ -1,6 +1,6 @@
/*
+----------------------------------------------------------------------+
- | PHP Version 5 |
+ | PHP Version 7 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2014 The PHP Group |
+----------------------------------------------------------------------+
@@ -88,7 +88,7 @@ static int firebird_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
pdo_firebird_db_handle *H = S->H;
- php_uint_t affected_rows = 0;
+ zend_ulong affected_rows = 0;
static char info_count[] = {isc_info_sql_records};
char result[64];
@@ -153,7 +153,7 @@ static int firebird_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */
/* called by PDO to fetch the next row from a statement */
static int firebird_stmt_fetch(pdo_stmt_t *stmt, /* {{{ */
- enum pdo_fetch_orientation ori, php_int_t offset TSRMLS_DC)
+ enum pdo_fetch_orientation ori, zend_long offset TSRMLS_DC)
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
pdo_firebird_db_handle *H = S->H;
@@ -219,7 +219,7 @@ static int firebird_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) /* {{{
/* fetch a blob into a fetch buffer */
static int firebird_fetch_blob(pdo_stmt_t *stmt, int colno, char **ptr, /* {{{ */
- php_uint_t *len, ISC_QUAD *blob_id TSRMLS_DC)
+ zend_ulong *len, ISC_QUAD *blob_id TSRMLS_DC)
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
pdo_firebird_db_handle *H = S->H;
@@ -263,7 +263,7 @@ static int firebird_fetch_blob(pdo_stmt_t *stmt, int colno, char **ptr, /* {{{ *
/* we've found the blob's length, now fetch! */
if (*len) {
- php_uint_t cur_len;
+ zend_ulong cur_len;
unsigned short seg_len;
ISC_STATUS stat;
@@ -296,7 +296,7 @@ fetch_blob_end:
/* }}} */
static int firebird_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, /* {{{ */
- php_uint_t *len, int *caller_frees TSRMLS_DC)
+ zend_ulong *len, int *caller_frees TSRMLS_DC)
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
XSQLVAR const *var = &S->out_sqlda.sqlvar[colno];
@@ -413,7 +413,7 @@ static int firebird_bind_blob(pdo_stmt_t *stmt, ISC_QUAD *blob_id, zval *param T
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
pdo_firebird_db_handle *H = S->H;
isc_blob_handle h = NULL;
- php_uint_t put_cnt = 0, rem_cnt;
+ zend_ulong put_cnt = 0, rem_cnt;
unsigned short chunk_size;
int result = 1;
@@ -425,7 +425,7 @@ static int firebird_bind_blob(pdo_stmt_t *stmt, ISC_QUAD *blob_id, zval *param T
SEPARATE_ZVAL(param);
convert_to_string_ex(param);
- for (rem_cnt = Z_STRSIZE_P(param); rem_cnt > 0; rem_cnt -= chunk_size) {
+ for (rem_cnt = Z_STRLEN_P(param); rem_cnt > 0; rem_cnt -= chunk_size) {
chunk_size = rem_cnt > USHRT_MAX ? USHRT_MAX : (unsigned short)rem_cnt;
@@ -467,7 +467,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
/* try to determine the index by looking in the named_params hash */
if ((index = zend_hash_find(S->named_params, param->name)) != NULL) {
- param->paramno = Z_IVAL_P(index);
+ param->paramno = Z_LVAL_P(index);
} else {
/* ... or by looking in the input descriptor */
int i;
@@ -495,7 +495,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
switch (event_type) {
char *value;
- php_uint_t value_len;
+ zend_ulong value_len;
int caller_frees;
zval *parameter;
@@ -549,11 +549,11 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
switch (Z_TYPE_P(parameter)) {
int force_null;
- case IS_INT:
+ case IS_LONG:
/* keep the allow-NULL flag */
- var->sqltype = (sizeof(php_int_t) == 8 ? SQL_INT64 : SQL_LONG) | (var->sqltype & 1);
- var->sqldata = (void*)&Z_IVAL_P(parameter);
- var->sqllen = sizeof(php_int_t);
+ var->sqltype = (sizeof(zend_long) == 8 ? SQL_INT64 : SQL_LONG) | (var->sqltype & 1);
+ var->sqldata = (void*)&Z_LVAL_P(parameter);
+ var->sqllen = sizeof(zend_long);
break;
case IS_DOUBLE:
/* keep the allow-NULL flag */
@@ -574,13 +574,13 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
case SQL_TIMESTAMP:
case SQL_TYPE_DATE:
case SQL_TYPE_TIME:
- force_null = (Z_STRSIZE_P(parameter) == 0);
+ force_null = (Z_STRLEN_P(parameter) == 0);
}
if (!force_null) {
/* keep the allow-NULL flag */
var->sqltype = SQL_TEXT | (var->sqltype & 1);
var->sqldata = Z_STRVAL_P(parameter);
- var->sqllen = Z_STRSIZE_P(parameter);
+ var->sqllen = Z_STRLEN_P(parameter);
break;
}
case IS_NULL:
@@ -626,7 +626,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
}
case PDO_PARAM_INT:
if (value) {
- ZVAL_INT(parameter, *(php_int_t*)value);
+ ZVAL_LONG(parameter, *(zend_long*)value);
break;
}
case PDO_PARAM_EVT_NORMALIZE:
@@ -654,7 +654,7 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat
}
/* }}} */
-static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, php_int_t attr, zval *val TSRMLS_DC) /* {{{ */
+static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, zend_long attr, zval *val TSRMLS_DC) /* {{{ */
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;
@@ -675,7 +675,7 @@ static int firebird_stmt_set_attribute(pdo_stmt_t *stmt, php_int_t attr, zval *v
}
/* }}} */
-static int firebird_stmt_get_attribute(pdo_stmt_t *stmt, php_int_t attr, zval *val TSRMLS_DC) /* {{{ */
+static int firebird_stmt_get_attribute(pdo_stmt_t *stmt, zend_long attr, zval *val TSRMLS_DC) /* {{{ */
{
pdo_firebird_stmt *S = (pdo_firebird_stmt*)stmt->driver_data;