Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument
@ 2020-04-03 23:01 Serge Petrenko
  2020-04-05 19:38 ` Vladislav Shpilevoy
  2020-04-08 17:01 ` Alexander Turenko
  0 siblings, 2 replies; 3+ messages in thread
From: Serge Petrenko @ 2020-04-03 23:01 UTC (permalink / raw)
  To: alexander.turenko; +Cc: tarantool-patches

---
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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument
  2020-04-03 23:01 [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument Serge Petrenko
@ 2020-04-05 19:38 ` Vladislav Shpilevoy
  2020-04-08 17:01 ` Alexander Turenko
  1 sibling, 0 replies; 3+ messages in thread
From: Vladislav Shpilevoy @ 2020-04-05 19:38 UTC (permalink / raw)
  To: Serge Petrenko, Kirill Yukhin; +Cc: tarantool-patches

LGTM.

On 04/04/2020 01:01, 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);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument
  2020-04-03 23:01 [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument Serge Petrenko
  2020-04-05 19:38 ` Vladislav Shpilevoy
@ 2020-04-08 17:01 ` Alexander Turenko
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander Turenko @ 2020-04-08 17:01 UTC (permalink / raw)
  To: Serge Petrenko; +Cc: tarantool-patches, 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)
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-08 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-03 23:01 [Tarantool-patches] [PATCH] Add const qualifier to mp_encode_ext argument Serge Petrenko
2020-04-05 19:38 ` Vladislav Shpilevoy
2020-04-08 17:01 ` Alexander Turenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox