From: Igor Munkin <imun@tarantool.org> To: Olga Arkhangelskaia <arkholga@tarantool.org> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH rfc] lua: expose luaL_serializer to Lua Date: Thu, 20 Feb 2020 14:23:59 +0300 [thread overview] Message-ID: <20200220112359.GE404@tarantool.org> (raw) In-Reply-To: <20200204090017.97814-1-arkholga@tarantool.org> Olya, Thanks for the patch, but since we reverted the commit introducing __pairs metamethod for userdata[1] I guess this approach can't replace the existing behaviour. On 04.02.20, Olga Arkhangelskaia wrote: > There are several modules in Lua allowing to transform data from one format to > another (yaml, msgpack, json). They are configured via cfg method. The options > are parts of struct luaL_serializer object in C. That method used to be > implemented via additional table on Lua stack and overriden __call metamethod. > Such implementation had hudge shortcoming: any field could be > changed/added via raw modification. And such change was not visible for > tarantool. > To leave the only one source of information/configuration possibility cfg table > was changed to userdata with index, newindex, pairs, call and serialize > metamethods. And the interface was remained unchanged. > Closes #4521 > --- > Branch: https://github.com/tarantool/tarantool/tree/OKriw/gh-4521-lua-serializers-should-use-FFI-to-check-and-set-options > src/lua/utils.c | 193 +++++++++++++++++++++++++++++++++++++++--------- > 1 file changed, 160 insertions(+), 33 deletions(-) > <snipped> > -- > 2.20.1 (Apple Git-117) > [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-February/014304.html -- Best regards, IM
prev parent reply other threads:[~2020-02-20 11:29 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-04 9:00 Olga Arkhangelskaia 2020-02-20 11:23 ` Igor Munkin [this message]
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=20200220112359.GE404@tarantool.org \ --to=imun@tarantool.org \ --cc=arkholga@tarantool.org \ --cc=tarantool-patches@dev.tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH rfc] lua: expose luaL_serializer to Lua' \ /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