[Tarantool-patches] [PATCH v2 2/3] fiber: destroy fiber.storage created by iproto

Cyrill Gorcunov gorcunov at gmail.com
Fri Jan 17 11:06:58 MSK 2020


On Fri, Jan 17, 2020 at 10:47:56AM +0300, Konstantin Osipov wrote:
> * Cyrill Gorcunov <gorcunov at gmail.com> [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!


More information about the Tarantool-patches mailing list