From: Sergey Kaplun <skaplun@tarantool.org>
To: Igor Munkin <imun@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org,
Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v2] lua: remove excess Lua call from table encoding
Date: Tue, 2 Jun 2020 17:16:36 +0300 [thread overview]
Message-ID: <20200602141636.GA8942@root> (raw)
In-Reply-To: <20200602135140.GC5745@tarantool.org>
Hi! Thanks for the review!
On 02.06.20, Igor Munkin wrote:
> 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>
>
I added corresponding fix to the branch
diff --git a/src/lua/utils.c b/src/lua/utils.c
index 67cab802c..0b05d7257 100644
--- a/src/lua/utils.c
+++ b/src/lua/utils.c
@@ -548,7 +548,7 @@ lua_field_inspect_table(struct lua_State *L, struct luaL_serializer *cfg,
(void)top;
if (res == 0)
return 0;
- /* Fallthrouth with res == 1 */
+ /* Fallthrough with res == 1 */
}
field->type = MP_ARRAY;
> > --
> > 2.24.1
> >
>
> --
> Best regards,
> IM
--
Best regards,
Sergey Kaplun
next prev parent reply other threads:[~2020-06-02 14:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-02 12:19 Sergey Kaplun
2020-06-02 13:51 ` Igor Munkin
2020-06-02 14:16 ` Sergey Kaplun [this message]
2020-06-02 14:13 ` Igor Munkin
2020-06-02 15:01 ` Sergey Kaplun
2020-06-02 16:57 ` Sergey Ostanevich
2020-06-05 7:14 ` Sergey Kaplun
2020-06-08 16:35 ` Sergey Ostanevich
2020-06-09 10:29 ` Sergey Kaplun
2020-06-02 21:28 ` Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200602141636.GA8942@root \
--to=skaplun@tarantool.org \
--cc=imun@tarantool.org \
--cc=tarantool-patches@dev.tarantool.org \
--cc=v.shpilevoy@tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH v2] lua: remove excess Lua call from table encoding' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox