From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (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 9916846970E for ; Fri, 17 Jan 2020 11:07:00 +0300 (MSK) Received: by mail-lf1-f67.google.com with SMTP id r14so17659451lfm.5 for ; Fri, 17 Jan 2020 00:07:00 -0800 (PST) Date: Fri, 17 Jan 2020 11:06:58 +0300 From: Cyrill Gorcunov Message-ID: <20200117080658.GQ31598@uranus> References: <31e884f2b6d2ab7b222229f1b204fa067d63ae65.1579211601.git.v.shpilevoy@tarantool.org> <20200116220033.GO31598@uranus> <20200117074756.GG24940@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200117074756.GG24940@atlas> Subject: Re: [Tarantool-patches] [PATCH v2 2/3] fiber: destroy fiber.storage created by iproto List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Konstantin Osipov Cc: tarantool-patches@dev.tarantool.org, Vladislav Shpilevoy On Fri, Jan 17, 2020 at 10:47:56AM +0300, Konstantin Osipov wrote: > * Cyrill Gorcunov [20/01/17 01:02]: > > On Thu, Jan 16, 2020 at 10:54:22PM +0100, Vladislav Shpilevoy wrote: > > ... > > > static int > > > lbox_fiber_storage(struct lua_State *L) > > > { > > > struct fiber *f = lbox_checkfiber(L, 1); > > > int storage_ref = f->storage.lua.ref; > > > if (storage_ref <= 0) { > > > + struct trigger *t = (struct trigger *) > > > + malloc(sizeof(*t)); > > > > Vlad, maybe you could point me -- why do we need an explicit cast here? > > It's a C++ habit, where void * is not implicitly cast-able to any > type. OK, thanks for info!