diff options
Diffstat (limited to 'ext/pdo_firebird/firebird_driver.c')
-rw-r--r-- | ext/pdo_firebird/firebird_driver.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index fb3979863b..ab4612a119 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -33,11 +33,11 @@ #include "php_pdo_firebird.h" #include "php_pdo_firebird_int.h" -static int firebird_alloc_prepare_stmt(pdo_dbh_t*, const char*, php_int_t, XSQLDA*, isc_stmt_handle*, +static int firebird_alloc_prepare_stmt(pdo_dbh_t*, const char*, zend_long, XSQLDA*, isc_stmt_handle*, HashTable* TSRMLS_DC); /* map driver specific error message to PDO error */ -void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, php_int_t line TSRMLS_DC) /* {{{ */ +void _firebird_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, char const *file, zend_long line TSRMLS_DC) /* {{{ */ { #if 0 pdo_firebird_db_handle *H = stmt ? ((pdo_firebird_stmt *)stmt->driver_data)->H @@ -132,7 +132,7 @@ static int firebird_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ /* }}} */ /* called by PDO to prepare an SQL query */ -static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, php_int_t sql_len, /* {{{ */ +static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, zend_long sql_len, /* {{{ */ pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC) { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; @@ -218,7 +218,7 @@ static int firebird_handle_preparer(pdo_dbh_t *dbh, const char *sql, php_int_t s /* }}} */ /* called by PDO to execute a statement that doesn't produce a result set */ -static php_int_t firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, php_int_t sql_len TSRMLS_DC) /* {{{ */ +static zend_long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, zend_long sql_len TSRMLS_DC) /* {{{ */ { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; isc_stmt_handle stmt = NULL; @@ -391,12 +391,12 @@ static int firebird_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ /* }}} */ /* used by prepare and exec to allocate a statement handle and prepare the SQL */ -static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, php_int_t sql_len, /* {{{ */ +static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, zend_long sql_len, /* {{{ */ XSQLDA *out_sqlda, isc_stmt_handle *s, HashTable *named_params TSRMLS_DC) { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; char *c, *new_sql, in_quote, in_param, pname[64], *ppname; - php_int_t l, pindex = -1; + zend_long l, pindex = -1; /* Firebird allows SQL statements up to 64k, so bail if it doesn't fit */ if (sql_len > 65536) { @@ -448,7 +448,7 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, php_int_ *ppname++ = 0; if (named_params) { zval tmp; - ZVAL_INT(&tmp, pindex); + ZVAL_LONG(&tmp, pindex); zend_hash_str_update(named_params, pname, (unsigned int)(ppname - pname - 1), &tmp); } } @@ -470,7 +470,7 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, php_int_ /* }}} */ /* called by PDO to set a driver-specific dbh attribute */ -static int firebird_handle_set_attribute(pdo_dbh_t *dbh, php_int_t attr, zval *val TSRMLS_DC) /* {{{ */ +static int firebird_handle_set_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val TSRMLS_DC) /* {{{ */ { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; @@ -545,7 +545,7 @@ static void firebird_info_cb(void *arg, char const *s) /* {{{ */ /* }}} */ /* called by PDO to get a driver-specific dbh attribute */ -static int firebird_handle_get_attribute(pdo_dbh_t *dbh, php_int_t attr, zval *val TSRMLS_DC) /* {{{ */ +static int firebird_handle_get_attribute(pdo_dbh_t *dbh, zend_long attr, zval *val TSRMLS_DC) /* {{{ */ { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; @@ -553,7 +553,7 @@ static int firebird_handle_get_attribute(pdo_dbh_t *dbh, php_int_t attr, zval *v char tmp[512]; case PDO_ATTR_AUTOCOMMIT: - ZVAL_INT(val,dbh->auto_commit); + ZVAL_LONG(val,dbh->auto_commit); return 1; case PDO_ATTR_CONNECTION_STATUS: @@ -606,10 +606,10 @@ static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; const ISC_STATUS *s = H->isc_status; char buf[400]; - php_int_t i = 0, l, sqlcode = isc_sqlcode(s); + zend_long i = 0, l, sqlcode = isc_sqlcode(s); if (sqlcode) { - add_next_index_int(info, sqlcode); + add_next_index_long(info, sqlcode); while ((sizeof(buf)>(i+2))&&(l = fb_interpret(&buf[i],(sizeof(buf)-i-2),&s))) { i += l; @@ -617,7 +617,7 @@ static int pdo_firebird_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval } add_next_index_string(info, buf); } else if (H->last_app_error) { - add_next_index_int(info, -999); + add_next_index_long(info, -999); add_next_index_string(info, const_cast(H->last_app_error)); } return 1; |