Re: [PATCH v2] Add bit operations util header - Mailing list pgsql-hackers

From Jeremy Kerr
Subject Re: [PATCH v2] Add bit operations util header
Date
Msg-id 200906040944.30578.jk@ozlabs.org
Whole thread Raw
In response to Re: [PATCH v2] Add bit operations util header  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses [RFC,PATCH] Avoid manual shift-and-test logic in AllocSetFreeIndex
List pgsql-hackers
Hi Tom,

> The other thing I didn't like about the patch was the assumption that
> it's okay to have a "static inline" function in a header.  You can
> get away with that in gcc but *not* in other compilers.

Gee, you user-space guys have it tough! :D

Point taken, will rework.

> Look at the existing coding patterns for, eg, list_head; then go thou
> and do likewise.  Or, since there's currently no need for the code
> outside aset.c, forget about putting it in a header and just plop it
> into aset.c.

OK, I'll add a configure check and conditionally use the builtin if it's 
available. I have some other patches that could be improved by using 
other builtins, so it would be a good opportunity to figure out a nice 
pattern for doing this.

Cheers,


Jeremy


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: [GENERAL] trouble with to_char('L')
Next
From: Emmanuel Cecchet
Date:
Subject: Re: Locks on temp table and PREPARE