[Tarantool-patches] [PATCH 2.X v4 3/4] module api: introduced luaT_toibuf instead of luaL_checkibuf

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Fri Oct 16 01:04:07 MSK 2020


Hi! Thanks for the patch!

Firstly, I agree with Alexander's comments.

Secondly, see my comment below.

> diff --git a/src/lua/utils.h b/src/lua/utils.h
> index e80e2b1a2..5e902b94e 100644
> --- a/src/lua/utils.h
> +++ b/src/lua/utils.h
> @@ -539,6 +539,14 @@ luaT_tolstring(lua_State *L, int idx, size_t *ssize);
>  LUA_API int
>  luaL_iscallable(lua_State *L, int idx);
>  
> +/**
> + * Check if a value on @a L stack by index @a idx is an ibuf
> + * object. Both 'struct ibuf' and 'struct ibuf *' are accepted.
> + * Returns NULL, if can't convert - not an ibuf object.
> + */
> +struct ibuf *
> +luaT_toibuf(struct lua_State *L, int idx);

AFAIR, we have decided to use box_ibuf_t, and not export struct ibuf
in module.h.


More information about the Tarantool-patches mailing list