summaryrefslogtreecommitdiff
path: root/ext/mysqli
diff options
context:
space:
mode:
authorAndrey Hristov <andrey@php.net>2010-11-10 13:57:09 +0000
committerAndrey Hristov <andrey@php.net>2010-11-10 13:57:09 +0000
commit332b953865131206f2a4b85905ceb2e83eb4e883 (patch)
tree14f0d6a8ad003dd5c05f12f67e339d314f0fa239 /ext/mysqli
parent6cb7ea4089b07e49defe4dd98c0b75124e93fd19 (diff)
downloadphp-git-332b953865131206f2a4b85905ceb2e83eb4e883.tar.gz
Fix bad types, because zend_parse_xxx expect signed integers
for lengths, no matter how stupid this is :)
Diffstat (limited to 'ext/mysqli')
-rw-r--r--ext/mysqli/mysqli_api.c10
-rw-r--r--ext/mysqli/mysqli_nonapi.c28
-rw-r--r--ext/mysqli/mysqli_report.c2
3 files changed, 20 insertions, 20 deletions
diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c
index 8557a1ba89..29b706b416 100644
--- a/ext/mysqli/mysqli_api.c
+++ b/ext/mysqli/mysqli_api.c
@@ -1763,7 +1763,7 @@ PHP_FUNCTION(mysqli_prepare)
MY_MYSQL *mysql;
MY_STMT *stmt;
char *query = NULL;
- unsigned int query_len;
+ int query_len;
zval *mysql_link;
MYSQLI_RESOURCE *mysqli_resource;
@@ -1847,10 +1847,10 @@ PHP_FUNCTION(mysqli_real_connect)
Binary-safe version of mysql_query() */
PHP_FUNCTION(mysqli_real_query)
{
- MY_MYSQL *mysql;
- zval *mysql_link;
- char *query = NULL;
- unsigned int query_len;
+ MY_MYSQL *mysql;
+ zval *mysql_link;
+ char *query = NULL;
+ int query_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) {
return;
diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c
index 1677bda5fd..4114527311 100644
--- a/ext/mysqli/mysqli_nonapi.c
+++ b/ext/mysqli/mysqli_nonapi.c
@@ -62,7 +62,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne
MYSQLI_RESOURCE *mysqli_resource = NULL;
zval *object = getThis();
char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL;
- unsigned int hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
+ int hostname_len = 0, username_len = 0, passwd_len = 0, dbname_len = 0, socket_len = 0;
zend_bool persistent = FALSE;
long port = 0, flags = 0;
uint hash_len;
@@ -362,9 +362,9 @@ PHP_FUNCTION(mysqli_fetch_assoc)
#if defined(MYSQLI_USE_MYSQLND)
PHP_FUNCTION(mysqli_fetch_all)
{
- MYSQL_RES *result;
- zval *mysql_result;
- long mode = MYSQLND_FETCH_NUM;
+ MYSQL_RES *result;
+ zval *mysql_result;
+ long mode = MYSQLND_FETCH_NUM;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &mysql_result, mysqli_result_class_entry, &mode) == FAILURE) {
return;
@@ -425,10 +425,10 @@ PHP_FUNCTION(mysqli_fetch_object)
allows to execute multiple queries */
PHP_FUNCTION(mysqli_multi_query)
{
- MY_MYSQL *mysql;
- zval *mysql_link;
- char *query = NULL;
- unsigned int query_len;
+ MY_MYSQL *mysql;
+ zval *mysql_link;
+ char *query = NULL;
+ int query_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) {
return;
@@ -473,8 +473,8 @@ PHP_FUNCTION(mysqli_query)
MYSQLI_RESOURCE *mysqli_resource;
MYSQL_RES *result;
char *query = NULL;
- unsigned int query_len;
- unsigned long resultmode = MYSQLI_STORE_RESULT;
+ int query_len;
+ long resultmode = MYSQLI_STORE_RESULT;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|l", &mysql_link, mysqli_link_class_entry, &query, &query_len, &resultmode) == FAILURE) {
return;
@@ -861,10 +861,10 @@ PHP_FUNCTION(mysqli_stmt_get_warnings)
sets client character set */
PHP_FUNCTION(mysqli_set_charset)
{
- MY_MYSQL *mysql;
- zval *mysql_link;
- char *cs_name;
- int csname_len;
+ MY_MYSQL *mysql;
+ zval *mysql_link;
+ char *cs_name;
+ int csname_len;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &cs_name, &csname_len) == FAILURE) {
return;
diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c
index 6cd5e74a42..2fd873f078 100644
--- a/ext/mysqli/mysqli_report.c
+++ b/ext/mysqli/mysqli_report.c
@@ -33,7 +33,7 @@ extern void php_mysqli_throw_sql_exception(char *sqlstate, int errorno TSRMLS_DC
sets report level */
PHP_FUNCTION(mysqli_report)
{
- long flags;
+ long flags;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &flags) == FAILURE) {