[Tarantool-patches] [PATCH v2 3/7] journal: add journal_entry_create helper

Cyrill Gorcunov gorcunov at gmail.com
Fri Jul 24 20:50:25 MSK 2020


On Fri, Jul 24, 2020 at 12:10:47AM +0200, Vladislav Shpilevoy wrote:
> >  
> > +/**
> > + * Initialize a new journal entry.
> > + */
> > +static inline void
> > +journal_entry_create(struct journal_entry *entry, size_t n_rows,
> > +		     size_t approx_len,
> > +		     void (*write_async_cb)(struct journal_entry *entry),
> > +		     void *complete_data)
> > +{
> > +	/*
> > +	 * fifo member is left untouched because
> > +	 * it is used by the journal engine internally,
> > +	 * no need to waste time here.
> 
> fifo -> Fifo.
> 
> Also you can use up to 80 symbols for comments now. No need to keep them
> tight. Here and in all other new places.

The fifo is a member of structure. Actually I just ripped off the comment
simply because we already have a number of _create helpers which implies
to initialize only the member which has to be initialized. If something
is not touched it means that the member is left for internal use and
can be left unitialized.


More information about the Tarantool-patches mailing list