diff options
author | Anatol Belski <ab@php.net> | 2014-08-19 19:02:07 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-19 19:02:07 +0200 |
commit | 4ed156d4df70acf0aa81dc75fceea1837157665f (patch) | |
tree | 6af9c9886e46c297f75ab51c535056cf229071af /ext/pdo_odbc | |
parent | 92269d25a37cbcfbb82364e9a58f232c880295a8 (diff) | |
download | php-git-4ed156d4df70acf0aa81dc75fceea1837157665f.tar.gz |
ported from pdo - pgsql, odbc, mysql, firebirt, dblib
Diffstat (limited to 'ext/pdo_odbc')
-rw-r--r-- | ext/pdo_odbc/odbc_driver.c | 8 | ||||
-rw-r--r-- | ext/pdo_odbc/odbc_stmt.c | 24 | ||||
-rw-r--r-- | ext/pdo_odbc/php_pdo_odbc_int.h | 4 |
3 files changed, 18 insertions, 18 deletions
diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 14f981375d..3a7bf0a37b 100644 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -142,7 +142,7 @@ static int odbc_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) return 0; } -static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC) +static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, php_int_t sql_len, pdo_stmt_t *stmt, zval *driver_options TSRMLS_DC) { RETCODE rc; pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; @@ -220,7 +220,7 @@ static int odbc_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, p return 1; } -static long odbc_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC) +static php_int_t odbc_handle_doer(pdo_dbh_t *dbh, const char *sql, php_int_t sql_len TSRMLS_DC) { pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; RETCODE rc; @@ -336,7 +336,7 @@ static int odbc_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) return 1; } -static int odbc_handle_set_attr(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) +static int odbc_handle_set_attr(pdo_dbh_t *dbh, php_int_t attr, zval *val TSRMLS_DC) { pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; switch (attr) { @@ -351,7 +351,7 @@ static int odbc_handle_set_attr(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) } } -static int odbc_handle_get_attr(pdo_dbh_t *dbh, long attr, zval *val TSRMLS_DC) +static int odbc_handle_get_attr(pdo_dbh_t *dbh, php_int_t attr, zval *val TSRMLS_DC) { pdo_odbc_db_handle *H = (pdo_odbc_db_handle *)dbh->driver_data; switch (attr) { diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index 20f725e5b3..7e2b958a53 100644 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -58,7 +58,7 @@ static int pdo_odbc_sqltype_is_unicode(pdo_odbc_stmt *S, SWORD sqltype) } static int pdo_odbc_utf82ucs2(pdo_stmt_t *stmt, int is_unicode, const char *buf, - unsigned long buflen, unsigned long *outlen) + php_uint_t buflen, php_uint_t *outlen) { #ifdef PHP_WIN32 if (is_unicode && buflen) { @@ -93,7 +93,7 @@ static int pdo_odbc_utf82ucs2(pdo_stmt_t *stmt, int is_unicode, const char *buf, } static int pdo_odbc_ucs22utf8(pdo_stmt_t *stmt, int is_unicode, const char *buf, - unsigned long buflen, unsigned long *outlen) + php_uint_t buflen, php_uint_t *outlen) { #ifdef PHP_WIN32 if (is_unicode && buflen) { @@ -190,7 +190,7 @@ static int odbc_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) } if (Z_TYPE_P(parameter) != IS_RESOURCE) { /* they passed in a string */ - unsigned long ulen; + php_uint_t ulen; convert_to_string(parameter); switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, @@ -458,7 +458,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p } else { convert_to_string(parameter); if (P->outbuf) { - unsigned long ulen; + php_uint_t ulen; switch (pdo_odbc_utf82ucs2(stmt, P->is_unicode, Z_STRVAL_P(parameter), Z_STRSIZE_P(parameter), @@ -483,9 +483,9 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p P = param->driver_data; if (P->outbuf) { - unsigned long ulen; + php_uint_t ulen; char *srcbuf; - unsigned long srclen = 0; + php_uint_t srclen = 0; if (Z_ISREF(param->parameter)) { parameter = Z_REFVAL(param->parameter); @@ -524,7 +524,7 @@ static int odbc_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *p } static int odbc_stmt_fetch(pdo_stmt_t *stmt, - enum pdo_fetch_orientation ori, long offset TSRMLS_DC) + enum pdo_fetch_orientation ori, php_int_t offset TSRMLS_DC) { RETCODE rc; SQLSMALLINT odbcori; @@ -628,15 +628,15 @@ static int odbc_stmt_describe(pdo_stmt_t *stmt, int colno TSRMLS_DC) return 1; } -static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsigned long *len, int *caller_frees TSRMLS_DC) +static int odbc_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, php_uint_t *len, int *caller_frees TSRMLS_DC) { pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; pdo_odbc_column *C = &S->cols[colno]; - unsigned long ulen; + php_uint_t ulen; /* if it is a column containing "long" data, perform late binding now */ if (C->is_long) { - unsigned long used = 0; + php_uint_t used = 0; char *buf; RETCODE rc; @@ -755,7 +755,7 @@ in_data: return 1; } -static int odbc_stmt_set_param(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC) +static int odbc_stmt_set_param(pdo_stmt_t *stmt, php_int_t attr, zval *val TSRMLS_DC) { SQLRETURN rc; pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; @@ -782,7 +782,7 @@ static int odbc_stmt_set_param(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC) } } -static int odbc_stmt_get_attr(pdo_stmt_t *stmt, long attr, zval *val TSRMLS_DC) +static int odbc_stmt_get_attr(pdo_stmt_t *stmt, php_int_t attr, zval *val TSRMLS_DC) { SQLRETURN rc; pdo_odbc_stmt *S = (pdo_odbc_stmt*)stmt->driver_data; diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h index 5e42951f86..c467ecf83a 100644 --- a/ext/pdo_odbc/php_pdo_odbc_int.h +++ b/ext/pdo_odbc/php_pdo_odbc_int.h @@ -135,7 +135,7 @@ typedef struct { typedef struct { char *data; - unsigned long datalen; + php_uint_t datalen; SQLLEN fetched_len; SWORD coltype; char colname[128]; @@ -150,7 +150,7 @@ typedef struct { pdo_odbc_db_handle *H; pdo_odbc_errinfo einfo; char *convbuf; - unsigned long convbufsize; + php_uint_t convbufsize; unsigned going_long:1; unsigned assume_utf8:1; unsigned _spare:30; |