[Tarantool-patches] [PATCH v2] lua: remove excess Lua call from table encoding

Igor Munkin imun at tarantool.org
Tue Jun 2 16:51:41 MSK 2020


Sergey,

Thanks, the patch LGTM except the one typo below.

On 02.06.20, Sergey Kaplun wrote:
> For safe table encoding <lua_field_try_serialize> function is pushed
> to Lua stack along with auxiliary lightuserdata and table object to be
> encoded. Its further protected call catches Lua error if one is raised
> while encoding. It is only necessary when the object to be serialized
> has __serialize field in metatable and this field is a Lua function.
> 
> This change reduces GC usage since a Lua function object is not
> created. Moreover the function serializing the given object is called
> without excess protected frame and auxiliary status struct.
> ---
> 
> branch: https://github.com/tarantool/tarantool/tree/skaplun/no-ticket-lua-inspect-table-refactoring
> 
>  src/lua/utils.c | 136 +++++++++++++++++-------------------------------
>  1 file changed, 48 insertions(+), 88 deletions(-)
> 
> diff --git a/src/lua/utils.c b/src/lua/utils.c
> index d410a3d03..67cab802c 100644
> --- a/src/lua/utils.c
> +++ b/src/lua/utils.c

<snipped>

> +		/* Fallthrouth with res == 1 */

Typo again: s/Fallthrouth/Fallthrough/.

<snipped>

> -- 
> 2.24.1
> 

-- 
Best regards,
IM


More information about the Tarantool-patches mailing list