[tarantool-patches] Re: [PATCH] txn: convert txn flags into bit mask

Konstantin Osipov kostja at tarantool.org
Tue Jul 30 13:21:03 MSK 2019


* Vladimir Davydov <vdavydov.dev at gmail.com> [19/07/30 11:00]:
> On Mon, Jul 29, 2019 at 06:37:54PM +0300, Konstantin Osipov wrote:
> > * Vladimir Davydov <vdavydov.dev at gmail.com> [19/07/29 15:33]:
> > > On Mon, Jul 29, 2019 at 03:14:11PM +0300, Konstantin Osipov wrote:
> > > > * Vladimir Davydov <vdavydov.dev at gmail.com> [19/07/29 13:56]:
> > > > > ---
> > > > > https://github.com/tarantool/tarantool/commits/dv/txn-flags
> > > > 
> > > > Curious, why not use bit fields?
> > 
> > I will read the article, I do not have a strong opinion, it's just
> > checking for bit flags using an enum looks a bit clumsy, how about 
> > a bit of syntax sugar like
> > txn_has_flag(txn, FLAG), tnx_set_flag(txn, FLAG),
> > txn_clear_flag(txn, FLAG).
> > 
> > What do you think?
> 
> Sounds reasonable. Here you go:

LGTM.


-- 
Konstantin Osipov, Moscow, Russia



More information about the Tarantool-patches mailing list