From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v2 1/1] schema:frommap() to create table or tuple Date: Tue, 3 Apr 2018 12:47:39 +0300 [thread overview] Message-ID: <b92831b2-a7ec-4148-2c15-fcf3b9d0bd6c@tarantool.org> (raw) In-Reply-To: <01c64ee0-2344-41ac-1ff3-b39172d99fd4@tarantool.org> Hello. Please, consider 4 comments below. > diff --git a/src/box/lua/space.cc b/src/box/lua/space.cc > index 29a9aca..2ff9a11 100644 > --- a/src/box/lua/space.cc > +++ b/src/box/lua/space.cc > @@ -32,11 +32,13 @@ > #include "box/lua/tuple.h" > #include "lua/utils.h" > #include "lua/trigger.h" > +#include "box/schema.h" > > extern "C" { > #include <lua.h> > #include <lauxlib.h> > #include <lualib.h> > + #include <trivia/util.h> > } /* extern "C" */ 1. Schema.h is included below. Trivia/util.h is not needed here. > + space = space_by_id(id); > + if (!space) > + luaL_error(L, "Specified space is not exists"); > + 2. Please, for pointers use explicit != NULL. 3. As I noted earlier, a function must not raise an error. It must return nil + error message/object. And please, check your comments grammar: you can not say "is not exists". Perhaps, you meant "does not exist". 4. I do not see my crash test in your space_frommap.test.lua. When I provide you a test, or you found an own, you must add it to the patch.
next prev parent reply other threads:[~2018-04-03 9:47 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-03-28 17:51 [tarantool-patches] " Kirill Shcherbatov 2018-03-28 18:28 ` Kirill Shcherbatov 2018-03-29 7:36 ` [tarantool-patches] " Kirill Shcherbatov 2018-03-29 10:14 ` v.shpilevoy 2018-04-02 10:26 ` Kirill Shcherbatov 2018-04-02 11:19 ` v.shpilevoy 2018-04-02 19:42 ` Kirill Shcherbatov 2018-04-03 9:47 ` Vladislav Shpilevoy [this message] 2018-04-04 14:14 ` Kirill Shcherbatov 2018-04-04 16:35 ` [tarantool-patches] " Kirill Shcherbatov 2018-04-04 16:43 ` Vladislav Shpilevoy 2018-04-06 13:47 ` Vladimir Davydov 2018-04-06 15:44 ` [tarantool-patches] " Konstantin Osipov 2018-04-09 8:30 ` Kirill Shcherbatov 2018-04-09 10:44 ` Vladislav Shpilevoy 2018-04-09 17:23 ` Kirill Shcherbatov 2018-04-09 17:45 ` Vladislav Shpilevoy 2018-04-10 10:31 ` Vladimir Davydov
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=b92831b2-a7ec-4148-2c15-fcf3b9d0bd6c@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v2 1/1] schema:frommap() to create table or tuple' \ /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