From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id CF0B0446420 for ; Wed, 8 Apr 2020 20:01:01 +0300 (MSK) Date: Wed, 8 Apr 2020 20:01:01 +0300 From: Alexander Turenko Message-ID: <20200408170101.465nxb3x5w7djuwq@tkn_work_nb> References: <20200403230158.43137-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200403230158.43137-1-sergepetrenko@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Serge Petrenko Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy LGTM. Pushed to tarantool/msgpuck master. WBR, Alexander Turenko. On Sat, Apr 04, 2020 at 02:01:58AM +0300, Serge Petrenko wrote: > --- > This is a fix needed in scope of tarantool#4268 (UUID type indices introduction) > > https://github.com/tarantool/tarantool/issues/4268 > https://github.com/tarantool/msgpuck/tree/sp/ext-type-fix > > msgpuck.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/msgpuck.h b/msgpuck.h > index 59fc1ee..5dfbbd9 100644 > --- a/msgpuck.h > +++ b/msgpuck.h > @@ -570,7 +570,7 @@ mp_encode_extl(char *data, int8_t type, uint32_t len); > * \sa mp_encode_strl > */ > MP_PROTO char * > -mp_encode_ext(char *data, int8_t type, char *str, uint32_t len); > +mp_encode_ext(char *data, int8_t type, const char *str, uint32_t len); > > /** > * \brief Check that \a cur buffer has enough bytes to decode an ext header. > @@ -1577,7 +1577,7 @@ mp_encode_extl(char *data, int8_t type, uint32_t len) > } > > MP_IMPL char * > -mp_encode_ext(char *data, int8_t type, char *str, uint32_t len) > +mp_encode_ext(char *data, int8_t type, const char *str, uint32_t len) > { > data = mp_encode_extl(data, type, len); > memcpy(data, str, len); > -- > 2.21.1 (Apple Git-122.3) >