com php-src: Revert "Add some const-ness to the protocol frame codec": ext/mysqlnd/mysqlnd_protocol_frame_codec.c ext/mysqln d/mysqlnd_structs.h
| From: | Andrey Hristov | Date: | Tue, 17 Nov 2015 16:55:32 +0000 |
| Subject: | com php-src: Revert "Add some const-ness to the protocol frame codec": ext/mysqlnd/mysqlnd_protocol_frame_codec.c ext/mysqln d/mysqlnd_structs.h | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89891@lists.php.net to get a copy of this message | ||
Commit: d477557094ab6fa23ec637ab102b717073ebd78f
Author: Andrey Hristov <andrey@php.net> Tue, 17 Nov 2015 17:55:32 +0100
Parents: 057ad5626bdc4cb89d8a43c380d646b7923eeb09
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d477557094ab6fa23ec637ab102b717073ebd78f
Log:
Revert "Add some const-ness to the protocol frame codec"
This reverts commit f8c2b459481209c3761a694baa6f38060dc9875a.
Changed paths:
M ext/mysqlnd/mysqlnd_protocol_frame_codec.c
M ext/mysqlnd/mysqlnd_structs.h
Diff:
diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c
index 0923800..a6b03df 100644
--- a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c
+++ b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c
@@ -62,14 +62,14 @@ MYSQLND_METHOD(mysqlnd_pfc, reset)(MYSQLND_PFC * const pfc, MYSQLND_STATS * cons
count + MYSQLND_HEADER_SIZE = sizeof(buffer) (not the pointer but the actual buffer)
*/
static size_t
-MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, const
zend_uchar * const buffer, const size_t count,
+MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, zend_uchar *
const buffer, const size_t count,
MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO * const error_info)
{
zend_uchar safe_buf[((MYSQLND_HEADER_SIZE) + (sizeof(zend_uchar)) - 1) / (sizeof(zend_uchar))];
zend_uchar * safe_storage = safe_buf;
size_t bytes_sent, packets_sent = 1;
size_t left = count;
- const zend_uchar * p = buffer;
+ zend_uchar * p = (zend_uchar *) buffer;
zend_uchar * compress_buf = NULL;
size_t to_be_sent;
@@ -93,7 +93,7 @@ MYSQLND_METHOD(mysqlnd_pfc, send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const v
/* here we need to compress the data and then write it, first comes the compressed header */
size_t tmp_complen = to_be_sent;
size_t payload_size;
- const zend_uchar * uncompressed_payload = p; /* should include the header */
+ zend_uchar * uncompressed_payload = p; /* should include the header */
STORE_HEADER_SIZE(safe_storage, uncompressed_payload);
int3store(uncompressed_payload, to_be_sent);
diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h
index 0402339..3df7c61 100644
--- a/ext/mysqlnd/mysqlnd_structs.h
+++ b/ext/mysqlnd/mysqlnd_structs.h
@@ -1075,7 +1075,7 @@ typedef enum_func_status (*func_mysqlnd_pfc__reset)(MYSQLND_PFC * const pfc,
MYS
typedef enum_func_status (*func_mysqlnd_pfc__set_client_option)(MYSQLND_PFC * const pfc,
enum_mysqlnd_client_option option, const char * const value);
typedef enum_func_status (*func_mysqlnd_pfc__decode)(zend_uchar * uncompressed_data, const size_t
uncompressed_data_len, const zend_uchar * const compressed_data, const size_t compressed_data_len);
typedef enum_func_status (*func_mysqlnd_pfc__encode)(zend_uchar * compress_buffer, size_t *
compress_buffer_len, const zend_uchar * const uncompressed_data, const size_t
uncompressed_data_len);
-typedef size_t (*func_mysqlnd_pfc__send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio, const
zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO
* const error_info);
+typedef size_t (*func_mysqlnd_pfc__send)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const vio,
zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats, MYSQLND_ERROR_INFO
* const error_info);
typedef enum_func_status (*func_mysqlnd_pfc__receive)(MYSQLND_PFC * const pfc, MYSQLND_VIO * const
vio, zend_uchar * const buffer, const size_t count, MYSQLND_STATS * const conn_stats,
MYSQLND_ERROR_INFO * const error_info);
typedef
enum_func_status (*func_mysqlnd_pfc__read_compressed_packet_from_stream_and_fill_read_buffer)(MYSQLND_PFC
* pfc, MYSQLND_VIO * const vio, size_t net_payload_size, MYSQLND_STATS * conn_stats,
MYSQLND_ERROR_INFO * error_info);
typedef void (*func_mysqlnd_pfc__free_contents)(MYSQLND_PFC * pfc);