From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f196.google.com (mail-lj1-f196.google.com [209.85.208.196]) (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 9433945C305 for ; Sat, 5 Dec 2020 21:52:30 +0300 (MSK) Received: by mail-lj1-f196.google.com with SMTP id r18so10482853ljc.2 for ; Sat, 05 Dec 2020 10:52:30 -0800 (PST) Date: Sat, 5 Dec 2020 21:52:28 +0300 From: Cyrill Gorcunov Message-ID: <20201205185228.GB2303@grain> References: <20201204153003.175555-1-gorcunov@gmail.com> <20201204153003.175555-2-gorcunov@gmail.com> <6ba34f0c-8ce5-75ae-2dd7-19e22432e744@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6ba34f0c-8ce5-75ae-2dd7-19e22432e744@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3 1/4] backtrace: allow to specify destination buffer List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: Mons Anderson , tml On Sat, Dec 05, 2020 at 07:30:28PM +0100, Vladislav Shpilevoy wrote: > Thanks for the patch! > > char * > > -backtrace(void) > > +backtrace(char *start, char *end) > > Why so strange choice of arguments? We almost always use char* + size_t, > except for a few cases such as code working with tuples, where we 'save' > time on not calculating 'end' in each next stack frame. Lets be consistent > and use char* + size_t, not to raise unnecessary questions for such simple > code. Since start/end were calculated inside I juts moved them to arguments. No problem, will use size instead.