diff options
author | Andrey Hristov <andrey@php.net> | 2015-11-17 17:55:32 +0100 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 2015-11-17 17:55:32 +0100 |
commit | d477557094ab6fa23ec637ab102b717073ebd78f (patch) | |
tree | 6edfd9c956080578ceedd411f1b2648c04be4205 /ext/mysqlnd/mysqlnd_protocol_frame_codec.c | |
parent | 057ad5626bdc4cb89d8a43c380d646b7923eeb09 (diff) | |
download | php-git-d477557094ab6fa23ec637ab102b717073ebd78f.tar.gz |
Revert "Add some const-ness to the protocol frame codec"
This reverts commit f8c2b459481209c3761a694baa6f38060dc9875a.
Diffstat (limited to 'ext/mysqlnd/mysqlnd_protocol_frame_codec.c')
-rw-r--r-- | ext/mysqlnd/mysqlnd_protocol_frame_codec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/mysqlnd/mysqlnd_protocol_frame_codec.c b/ext/mysqlnd/mysqlnd_protocol_frame_codec.c index 092380038f..a6b03df0c3 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); |