Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: tarantool-patches@freelists.org, imeevma@tarantool.org
Cc: vdavydov.dev@gmail.com
Subject: Re: [tarantool-patches] [PATCH v2 3/3] netbox: define formats for tuple from netbox
Date: Fri, 21 Jun 2019 22:39:39 +0200	[thread overview]
Message-ID: <d13a8c5f-6fc9-f65e-d76e-f4a6a20dae1a@tarantool.org> (raw)
In-Reply-To: <97e8c658f842bd9a623b1673f6ae752082502114.1561130584.git.imeevma@gmail.com>

Thanks for the patch!

> diff --git a/src/box/lua/net_box.c b/src/box/lua/net_box.c
> @@ -618,6 +618,13 @@ static int
>  netbox_decode_select(struct lua_State *L)
>  {
>  	uint32_t ctypeid;
> +	int top = lua_gettop(L);
> +	assert(top == 1 || top == 2);
> +	struct tuple_format *format;
> +	if (top == 2 && lua_type(L, 2) == LUA_TCDATA)
> +		format = lbox_check_tuple_format(L, 2);

How is it possible, that we do not have a format here?

> +	else
> +		format = tuple_format_runtime;
>  	const char *data = *(const char **)luaL_checkcdata(L, 1, &ctypeid);
>  	assert(mp_typeof(*data) == MP_MAP);
>  	uint32_t map_size = mp_decode_map(&data);

      reply	other threads:[~2019-06-21 20:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 15:25 [PATCH v2 0/3] " imeevma
2019-06-21 15:25 ` [PATCH v2 1/3] netbox: store method_encoder args in request imeevma
2019-06-21 20:39   ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-21 15:25 ` [PATCH v2 2/3] lua: internal function to parse space format imeevma
2019-06-21 20:39   ` [tarantool-patches] " Vladislav Shpilevoy
2019-06-21 15:25 ` [PATCH v2 3/3] netbox: define formats for tuple from netbox imeevma
2019-06-21 20:39   ` Vladislav Shpilevoy [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=d13a8c5f-6fc9-f65e-d76e-f4a6a20dae1a@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [tarantool-patches] [PATCH v2 3/3] netbox: define formats for tuple from netbox' \
    /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