[Tarantool-patches] [PATCH v4 52/53] sql: introduce mem_get_binary()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Mar 30 02:09:12 MSK 2021
Thanks for the patch!
> diff --git a/src/box/sql/func.c b/src/box/sql/func.c
> index 78f4ec3b5..199f3abef 100644
> --- a/src/box/sql/func.c
> +++ b/src/box/sql/func.c
> @@ -72,6 +72,19 @@ mem_get_ustr(struct Mem *mem)
> return (const unsigned char *)str;
> }
>
> +static const void *
> +mem_get_blob(struct Mem *mem)
The same comments as in the previous patch with strings. Also you
use 'binary' term in the other places, not 'blob'. I would propose to
keep it consistent if we want to switch to 'binary' everywhere.
> +{
> + const char *s;
> + if (!mem_is_varstring(mem) && mem_convert_to_string(mem) != 0)
> + return NULL;
> + if (ExpandBlob(mem) != 0)
> + return NULL;
> + if (mem_get_binary(mem, &s) != 0)
> + return NULL;
> + return (const void *)s;
> +}
More information about the Tarantool-patches
mailing list