Re: [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros - Mailing list pgsql-hackers

From Jeremy Kerr
Subject Re: [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros
Date
Msg-id 200907201000.53416.jk@ozlabs.org
Whole thread Raw
In response to Re: [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros
List pgsql-hackers
Hi Robert,

> Perhaps we should use macros.

I was trying to avoid macros, as this means we lose type- and syntax- 
checking at the call-site, and end up with slightly messier code. 
However, I understand that this is probably personal preference for me 
:)

How about just 'static' functions? (ie, drop the 'inline'). This way, 
the compiler is free to inline where suitable, and non-inlining 
compilers will do the right thing too.

However, I'd rather make decisions on data, rather than guessing. Is the 
actual problem here that some compilers just don't support the 'inline' 
keyword?

Cheers,


Jeremy


pgsql-hackers by date:

Previous
From: KaiGai Kohei
Date:
Subject: Re: [PATCH] SE-PgSQL/tiny rev.2193
Next
From: Tom Lane
Date:
Subject: Re: [PATCH 1/2 v3] [libpq] rework sigpipe-handling macros