From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f194.google.com (mail-lj1-f194.google.com [209.85.208.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 263B3469710 for ; Wed, 13 May 2020 00:27:28 +0300 (MSK) Received: by mail-lj1-f194.google.com with SMTP id e25so15385776ljg.5 for ; Tue, 12 May 2020 14:27:28 -0700 (PDT) Date: Wed, 13 May 2020 00:27:24 +0300 From: Cyrill Gorcunov Message-ID: <20200512212724.GI2219@grain> References: <22a830fb9d2dbc3883b9710d36ab88c638101002.1589240704.git.v.shpilevoy@tarantool.org> <20200512175205.GF2219@grain> <6c8dc667-43ce-997b-1b1f-cf725f05a2f8@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6c8dc667-43ce-997b-1b1f-cf725f05a2f8@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH 4/5] error: provide MP_ERROR extension serializer List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: tarantool-patches@dev.tarantool.org On Tue, May 12, 2020 at 10:38:25PM +0200, Vladislav Shpilevoy wrote: ... > > > > Don't get it -- include current file?! This a good sign of > > some kind of problem in the code structure... If we need > > a template then it should be some .cc/.c file explicily > > included instead of __FILE__, no? > > I don't want to introduce a new file just for these 2 functions > (mp_fprint_error() and mp_snprint_error()). This would be even > worse than it is now. So I used the same file. I wrote __FILE__ > instead of mp_error.cc, so as to minimize diff, when mp_error.cc > will be converted to C and moved to lib/core (that is planned). > Also #include __FILE__ is more clear, when you want to say > "include self", IMO. OK, thanks for the long explanation, Vlad! I trimmed the mail to not overquote. As to alignments and the rest -- up to you (hopefully Sergey and Nikita will take look as well).