[Tarantool-patches] [PATCH v4 47/53] sql: introduce mem_get_integer()
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Mar 30 02:08:24 MSK 2021
Thanks for the patch!
> diff --git a/src/box/sql/func.c b/src/box/sql/func.c
> index b644c39d8..0fa0f6ac7 100644
> --- a/src/box/sql/func.c
> +++ b/src/box/sql/func.c
> @@ -1532,10 +1543,11 @@ hexFunc(sql_context * context, int argc, sql_value ** argv)
> static void
> zeroblobFunc(sql_context * context, int argc, sql_value ** argv)
> {
> - i64 n;
> + int64_t n;
> assert(argc == 1);
> UNUSED_PARAMETER(argc);
> - n = sql_value_int64(argv[0]);
> + bool unused;
> + mem_get_integer(argv[0], &n, &unused);
The flag is never used anywhere except one assertion where you can
check the integer value instead. I think you can drop this out
parameter. In future we could add mem_get_int_with_sign() or something
like that if necessary.
More information about the Tarantool-patches
mailing list