andrey Tue Apr 19 09:28:44 2005 EDT Modified files: /php-src/ext/mysqli mysqli_api.c Log: - nail down another 64bit problem. this will fix about 14 failing tests on amd64 (probably other 64 bit arch). - use ulong for this boolean variable, as it was before - throw an warning if offset passed to mysqli_stmt_data_seek is negative http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.103&r2=1.104&ty=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.103 php-src/ext/mysqli/mysqli_api.c:1.104 --- php-src/ext/mysqli/mysqli_api.c:1.103 Tue Apr 19 08:59:15 2005 +++ php-src/ext/mysqli/mysqli_api.c Tue Apr 19 09:28:41 2005 @@ -15,7 +15,7 @@ | Author: Georg Richter <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c,v 1.103 2005/04/19 12:59:15 andrey Exp $ + $Id: mysqli_api.c,v 1.104 2005/04/19 13:28:41 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -588,7 +588,7 @@ zval *mysql_stmt; unsigned int i; ulong ret; - long lval; + int lval; double dval; my_ulonglong llval; @@ -614,11 +614,11 @@ if (!stmt->result.is_null[i]) { switch (stmt->result.buf[i].type) { case IS_LONG: - memcpy(&lval, stmt->result.buf[i].val, sizeof(long)); + memcpy(&lval, stmt->result.buf[i].val, sizeof(lval)); ZVAL_LONG(stmt->result.vars[i], lval); break; case IS_DOUBLE: - memcpy(&dval, stmt->result.buf[i].val, sizeof(double)); + memcpy(&dval, stmt->result.buf[i].val, sizeof(dval)); ZVAL_DOUBLE(stmt->result.vars[i], dval); break; case IS_STRING: @@ -1491,6 +1491,9 @@ if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &mysql_stmt, mysqli_stmt_class_entry, &offset) == FAILURE) { return; } + if (offset < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Offset must be positive"); + } MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt"); @@ -1698,7 +1701,7 @@ { MY_STMT *stmt; zval *mysql_stmt; - zend_bool mode; + ulong mode; ulong attr; int rc;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php