Re: LWLockAcquire and LockBuffer mode argument - Mailing list pgsql-hackers

From Andres Freund
Subject Re: LWLockAcquire and LockBuffer mode argument
Date
Msg-id 20200825183002.fkvzxtneijsdgrfv@alap3.anarazel.de
Whole thread Raw
In response to Re: LWLockAcquire and LockBuffer mode argument  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hi,

On 2020-08-25 14:22:28 -0400, Robert Haas wrote:
> On Tue, Aug 25, 2020 at 2:17 PM Andres Freund <andres@anarazel.de> wrote:
> > It seems easy enough to slap a compiler "enforced" deprecation warning
> > on the new compat version, in master only. Seems unnecessary to make
> > life immediately harder for extensions authors desiring cross-version
> > compatibility.
> 
> I don't know exactly how you'd go about implementing that, but I am
> not against compatibility. I *am* against coding rules that require a
> lot of manual enforcement.

#if I_AM_GCC_OR_CLANG
#define pg_attribute_deprecated __attribute__((deprecated))
#elif I_AM_MSVC
#define pg_attribute_deprecated __declspec(deprecated)
#else
#define pg_attribute_deprecated
#endif

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: LWLockAcquire and LockBuffer mode argument
Next
From: Peter Geoghegan
Date:
Subject: Re: LWLockAcquire and LockBuffer mode argument