From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 32A306EC40; Sun, 4 Jul 2021 16:10:04 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 32A306EC40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1625404204; bh=8j/8TcKYEwdMwq6aU7RYcNc6znOX8ctyuH6FrpfjWbs=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=czmaSs82VOH6sH0sEfOx/CV4c0f3fclYvjE+qXHPuwwAZoTwdQS85/2VIH1ydWJHT 8S8K9t8iEwAyUczLouGawQd8FLSJLbEa7roTI4NU9LutLI4Jnp2B1iQ17pb3N6eNyd +JFeJmd+JJIALAFPL7VHqUORgrTHB+bdVE3YdNBw= Received: from smtpng2.i.mail.ru (smtpng2.i.mail.ru [94.100.179.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id B6A0F6EC40 for ; Sun, 4 Jul 2021 16:10:02 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B6A0F6EC40 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1m01sn-0001lR-NI; Sun, 04 Jul 2021 16:10:02 +0300 To: Alexander Turenko , Cyrill Gorcunov , Roman Khabibov Cc: tarantool-patches@dev.tarantool.org References: Message-ID: <98109d2e-4efd-1ee5-86e2-b2d1574653fa@tarantool.org> Date: Sun, 4 Jul 2021 15:10:00 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD954DFF1DC42D673FB4F75AC5594ACDC16869A51A860A12816182A05F5380850402E195B6980C44D865CF57A0EBE51B9689F264560D73AC6FB0450721BA7E4CA4D X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE716FAD50E497B9C14EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D5E2B9AD3FB55F7E8638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D8F1AD723D22F1A774BC5EB2DADCF9F6C7117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC3A703B70628EAD7BA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD1828451B159A507268D2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B67393CE827C55B5F775ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-C1DE0DAB: 0D63561A33F958A5495A11741154FE2CB7B38CC6C847353B770CFFB01DFC235CD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75342909995EBBA6E4410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D345DE7771146E56B0868467C33997588FDA13D9BD460DF863C5BA40EA7DBB2C40DA63380034F8E706E1D7E09C32AA3244C40FCE2BBE9834A5842AAA78FA360D20C81560E2432555DBB927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2bioj5fH2RN9TpJlaMMFgB3tOsw== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5D9DA2E07479904539F84F2D15649668B53841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH 1/4] lua: move serializer helpers into its own file X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! See 3 comments below. > diff --git a/src/lua/init.c b/src/lua/init.c > index 93e93a103..ff11d202b 100644 > --- a/src/lua/init.c > +++ b/src/lua/init.c > @@ -69,6 +69,10 @@ > #include > #include > > +/* Don't include the entire header only for *_init(). */ 1. But what is the problem with that? It would be simpler and consistent with the other inits. > diff --git a/src/lua/serializer.c b/src/lua/serializer.c > new file mode 100644 > index 000000000..6c3dd73af > --- /dev/null > +++ b/src/lua/serializer.c > @@ -0,0 +1,651 @@ > +/* > + * Copyright 2010-2021, Tarantool AUTHORS, please see AUTHORS file. > + * > + * Redistribution and use in source and binary forms, with or > + * without modification, are permitted provided that the following > + * conditions are met: > + * > + * 1. Redistributions of source code must retain the above > + * copyright notice, this list of conditions and the > + * following disclaimer. > + * > + * 2. Redistributions in binary form must reproduce the above > + * copyright notice, this list of conditions and the following > + * disclaimer in the documentation and/or other materials > + * provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED > + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR > + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL > + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, > + * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF > + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR > + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF > + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF > + * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > +#include > +#include > +#include /* modf, isfinite */ > +#include > +#include 2. These are already included in the header. And some of the others below too. > diff --git a/src/lua/serializer.h b/src/lua/serializer.h > new file mode 100644 > index 000000000..54b0bc11a > --- /dev/null > +++ b/src/lua/serializer.h > @@ -0,0 +1,344 @@ > +#ifndef TARANTOOL_LUA_SERIALIZER_H_INCLUDED > +#define TARANTOOL_LUA_SERIALIZER_H_INCLUDED 3. According to the code style, new files should use `#pragma once`.