Re: [HACKERS] -Wcast-qual cleanup, part 1

2011-11-10 Thread Peter Eisentraut
On mån, 2011-11-07 at 10:07 -0500, Tom Lane wrote: > >> 2. Macros accessing structures should come in two variants: a > "get" > >> version, and a "set"/anything else version, so that the "get" > version > >> can preserve the const qualifier. > > I'm not prepared to buy into that as a general codi

Re: [HACKERS] -Wcast-qual cleanup, part 1

2011-11-07 Thread Tom Lane
Robert Haas writes: > On Mon, Nov 7, 2011 at 12:13 AM, Peter Eisentraut wrote: >> typedef struct ErrorContextCallback >> { >> struct ErrorContextCallback *previous; >> -void(*callback) (void *arg); >> -void *arg; >> +void(*callback) (const void *ar

Re: [HACKERS] -Wcast-qual cleanup, part 1

2011-11-07 Thread Robert Haas
On Mon, Nov 7, 2011 at 12:13 AM, Peter Eisentraut wrote: > Anyway, attached is the first patch for your amusement. I can't help but wonder if the cure isn't worse than the disease. I mean, I very much like the fact that our code compiles without warnings, and I'm glad you're willing to put in th