andrey Tue, 05 Oct 2010 17:03:50 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=304114
Log:
Rename a method so it doesn't clash with a global symbol - a function
Fix compiler waring by extening the type of a variable
Changed paths:
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
U php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
U php/php-src/trunk/ext/mysqlnd/mysqlnd.c
U php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2010-10-05 16:54:14 UTC
(rev 304113)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd.c 2010-10-05 17:03:50 UTC
(rev 304114)
@@ -1368,14 +1368,14 @@
/* }}} */
-/* {{{ mysqlnd_conn::stat */
+/* {{{ mysqlnd_conn::statistic */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn, stat)(MYSQLND * conn, char **message, unsigned
int * message_len TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_conn, statistic)(MYSQLND * conn, char **message,
unsigned int * message_len TSRMLS_DC)
{
enum_func_status ret;
MYSQLND_PACKET_STATS * stats_header;
- DBG_ENTER("mysqlnd_conn::stat");
+ DBG_ENTER("mysqlnd_conn::statistic");
DBG_INF_FMT("conn=%llu", conn->thread_id);
ret = conn->m->simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST,
FALSE, TRUE TSRMLS_CC);
@@ -1560,13 +1560,13 @@
STAT_CLOSE_IMPLICIT,
STAT_CLOSE_DISCONNECT
};
- enum_mysqlnd_collected_stats stat = close_type_to_stat_map[close_type];
+ enum_mysqlnd_collected_stats statistic =
close_type_to_stat_map[close_type];
DBG_ENTER("mysqlnd_conn::close");
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (conn->state >= CONN_READY) {
- MYSQLND_INC_CONN_STATISTIC(conn->stats, stat);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic);
MYSQLND_DEC_CONN_STATISTIC(conn->stats,
STAT_OPENED_CONNECTIONS);
if (conn->persistent) {
MYSQLND_DEC_CONN_STATISTIC(conn->stats,
STAT_OPENED_PERSISTENT_CONNECTIONS);
@@ -2256,7 +2256,7 @@
MYSQLND_METHOD(mysqlnd_conn, get_server_version),
MYSQLND_METHOD(mysqlnd_conn, get_server_info),
- MYSQLND_METHOD(mysqlnd_conn, stat),
+ MYSQLND_METHOD(mysqlnd_conn, statistic),
MYSQLND_METHOD(mysqlnd_conn, get_host_info),
MYSQLND_METHOD(mysqlnd_conn, get_proto_info),
MYSQLND_METHOD(mysqlnd_conn, info),
Modified: php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2010-10-05
16:54:14 UTC (rev 304113)
+++ php/php-src/branches/PHP_5_3/ext/mysqlnd/mysqlnd_result.c 2010-10-05
17:03:50 UTC (rev 304114)
@@ -194,7 +194,7 @@
{
MYSQLND_RES_BUFFERED *set = result->stored_data;
unsigned int field_count = result->field_count;
- int row;
+ int64_t row;
DBG_ENTER("mysqlnd_res::free_buffered_data");
DBG_INF_FMT("Freeing "MYSQLND_LLU_SPEC" row(s)", set->row_count);
@@ -211,7 +211,7 @@
int col;
if (current_row != NULL) {
- for (col = field_count - 1; col >= 0; --col) {
+ for (col = (int64_t) field_count - 1; col >= 0;
--col) {
if (current_row[col]) {
zend_bool copy_ctor_called;
mysqlnd_palloc_zval_ptr_dtor(&(current_row[col]), result->type,
©_ctor_called TSRMLS_CC);
@@ -1229,7 +1229,7 @@
ret = FAIL;
goto end;
}
- memset(set->data, 0, set->row_count * meta->field_count *
sizeof(zval *));
+ memset(set->data, 0, (size_t)(set->row_count *
meta->field_count * sizeof(zval *)));
}
MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats,
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2010-10-05 16:54:14 UTC (rev
304113)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd.c 2010-10-05 17:03:50 UTC (rev
304114)
@@ -1391,14 +1391,14 @@
/* }}} */
-/* {{{ mysqlnd_conn::stat */
+/* {{{ mysqlnd_conn::statistic */
static enum_func_status
-MYSQLND_METHOD(mysqlnd_conn, stat)(MYSQLND * conn, char **message, unsigned
int * message_len TSRMLS_DC)
+MYSQLND_METHOD(mysqlnd_conn, statistic)(MYSQLND * conn, char **message,
unsigned int * message_len TSRMLS_DC)
{
enum_func_status ret;
MYSQLND_PACKET_STATS * stats_header;
- DBG_ENTER("mysqlnd_conn::stat");
+ DBG_ENTER("mysqlnd_conn::statistic");
DBG_INF_FMT("conn=%llu", conn->thread_id);
ret = conn->m->simple_command(conn, COM_STATISTICS, NULL, 0, PROT_LAST,
FALSE, TRUE TSRMLS_CC);
@@ -1583,13 +1583,13 @@
STAT_CLOSE_IMPLICIT,
STAT_CLOSE_DISCONNECT
};
- enum_mysqlnd_collected_stats stat = close_type_to_stat_map[close_type];
+ enum_mysqlnd_collected_stats statistic =
close_type_to_stat_map[close_type];
DBG_ENTER("mysqlnd_conn::close");
DBG_INF_FMT("conn=%llu", conn->thread_id);
if (conn->state >= CONN_READY) {
- MYSQLND_INC_CONN_STATISTIC(conn->stats, stat);
+ MYSQLND_INC_CONN_STATISTIC(conn->stats, statistic);
MYSQLND_DEC_CONN_STATISTIC(conn->stats,
STAT_OPENED_CONNECTIONS);
if (conn->persistent) {
MYSQLND_DEC_CONN_STATISTIC(conn->stats,
STAT_OPENED_PERSISTENT_CONNECTIONS);
@@ -2279,7 +2279,7 @@
MYSQLND_METHOD(mysqlnd_conn, get_server_version),
MYSQLND_METHOD(mysqlnd_conn, get_server_info),
- MYSQLND_METHOD(mysqlnd_conn, stat),
+ MYSQLND_METHOD(mysqlnd_conn, statistic),
MYSQLND_METHOD(mysqlnd_conn, get_host_info),
MYSQLND_METHOD(mysqlnd_conn, get_proto_info),
MYSQLND_METHOD(mysqlnd_conn, info),
Modified: php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c
===================================================================
--- php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2010-10-05 16:54:14 UTC
(rev 304113)
+++ php/php-src/trunk/ext/mysqlnd/mysqlnd_result.c 2010-10-05 17:03:50 UTC
(rev 304114)
@@ -194,7 +194,7 @@
{
MYSQLND_RES_BUFFERED *set = result->stored_data;
unsigned int field_count = result->field_count;
- int row;
+ int64_t row;
DBG_ENTER("mysqlnd_res::free_buffered_data");
DBG_INF_FMT("Freeing "MYSQLND_LLU_SPEC" row(s)", set->row_count);
@@ -211,7 +211,7 @@
int col;
if (current_row != NULL) {
- for (col = field_count - 1; col >= 0; --col) {
+ for (col = (int64_t) field_count - 1; col >= 0;
--col) {
if (current_row[col]) {
zend_bool copy_ctor_called;
mysqlnd_palloc_zval_ptr_dtor(&(current_row[col]), result->type,
©_ctor_called TSRMLS_CC);
@@ -1229,7 +1229,7 @@
ret = FAIL;
goto end;
}
- memset(set->data, 0, set->row_count * meta->field_count *
sizeof(zval *));
+ memset(set->data, 0, (size_t)(set->row_count *
meta->field_count * sizeof(zval *)));
}
MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats,
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php