From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 30 Jul 2019 13:27:49 +0300 From: Vladimir Davydov Subject: Re: [tarantool-patches] Re: [PATCH] txn: convert txn flags into bit mask Message-ID: <20190730102749.GG4659@esperanza> References: <7aafa5dcfee6521e4e73cc5f47640b7189b255e3.1564397497.git.vdavydov.dev@gmail.com> <20190729121410.GA16601@atlas> <20190729123002.GE4659@esperanza> <20190729153754.GA26958@atlas> <20190730075857.GF4659@esperanza> <20190730102103.GA21469@atlas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190730102103.GA21469@atlas> To: Konstantin Osipov Cc: tarantool-patches@freelists.org List-ID: On Tue, Jul 30, 2019 at 01:21:03PM +0300, Konstantin Osipov wrote: > * Vladimir Davydov [19/07/30 11:00]: > > On Mon, Jul 29, 2019 at 06:37:54PM +0300, Konstantin Osipov wrote: > > > * Vladimir Davydov [19/07/29 15:33]: > > > > On Mon, Jul 29, 2019 at 03:14:11PM +0300, Konstantin Osipov wrote: > > > > > * Vladimir Davydov [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. Pushed to master.