From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 4A06C2B702 for ; Wed, 3 Oct 2018 11:05:56 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aJJ2ALaCTRTK for ; Wed, 3 Oct 2018 11:05:56 -0400 (EDT) Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0B0992B701 for ; Wed, 3 Oct 2018 11:05:56 -0400 (EDT) Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1g7iio-0003DL-Lr for tarantool-patches@freelists.org; Wed, 03 Oct 2018 18:05:54 +0300 Subject: [tarantool-patches] Re: [PATCH] box: add tuple:size function References: <1538070923-23087-1-git-send-email-ivushkinalex@gmail.com> From: Vladislav Shpilevoy Message-ID: <63bd7172-5f30-50fc-1623-f44dfc8e163d@tarantool.org> Date: Wed, 3 Oct 2018 18:05:54 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format="flowed" Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Also, make this patch on 1.10, not on 2.0. On 03/10/2018 17:20, Vladislav Shpilevoy wrote: > Hi! Thanks for the patch! > > On 27/09/2018 20:55, AlexeyIvushkin wrote: >> From: Morgan-iv >> >> When operating with tuples, we only have tuple:bsize function >> to get size of tuple. tuple:bsize returns only size of MessagePack >> part of struct tuple, without tuple_meta. New function tuple:size >> returns size of all tuple, with MessagePack and tuple_meta >> >> Closes #2256 > > Please, write here a documentation request to fix doc of > tuple:bsize (it returns Message Pack size only) and to > describe the new method tuple:size(). > > How to write documentation requests in a commit see > tarantool/docbot repository and commits like this: > https://github.com/tarantool/tarantool/commit/1663bdc4a86fa6fd43903d2d52dd5a743b87f33b > >> --- >> https://github.com/tarantool/tarantool/issues/2256 >> https://github.com/tarantool/tarantool/tree/Morgan-iv/gh-2256 >>   src/box/lua/tuple.c     | 10 ++++++++++ >>   src/box/lua/tuple.lua   |  1 + >>   test/box/tuple.result   | 12 ++++++++++++ >>   test/box/tuple.test.lua |  6 ++++++ >>   4 files changed, 29 insertions(+) >> >> diff --git a/test/box/tuple.result b/test/box/tuple.result >> index e035cb9..418f5f8 100644 >> --- a/test/box/tuple.result >> +++ b/test/box/tuple.result >> @@ -186,6 +186,18 @@ t:bsize() >>   --- >>   - 5 >>   ... >> +-- tuple:size() > > Please, put more details in the comment about > the issue. See other tests. The comment should > look like: > > -- > -- gh-: . > -- > ... a test ... > >> +t = box.tuple.new('abc') >> +--- >> +... >> +t >> +--- >> +- ['abc'] >> +... >> +t:size() >> +--- >> +- 15 >> +... >>   -- >>   -- Test cases for #106 box.tuple.new fails on multiple items >>   -- >