Re: [HACKERS] confusing typedefs in jsonfuncs.c

2013-07-20 Thread Peter Eisentraut
On Thu, 2013-07-18 at 21:34 -0400, Tom Lane wrote: > Yeah, this is randomly different from everywhere else in PG. The more > usual convention if you want typedefs for both the struct and the > pointer type is that the pointer type is FooBar and the struct type is > FooBarData. I think that is mor

Re: [HACKERS] confusing typedefs in jsonfuncs.c

2013-07-19 Thread Andrew Dunstan
On 07/18/2013 09:20 PM, Peter Eisentraut wrote: The new jsonfuncs.c has some confusing typedef scheme. For example, it has a bunch of definitions like this: typedef struct getState { ... } getState, *GetState; So GetState is a pointer to getState. I have never seen that kind of conventi

Re: [HACKERS] confusing typedefs in jsonfuncs.c

2013-07-18 Thread Tom Lane
Peter Eisentraut writes: > The new jsonfuncs.c has some confusing typedef scheme. For example, it > has a bunch of definitions like this: > typedef struct getState > { > ... > } getState, *GetState; > So GetState is a pointer to getState. I have never seen that kind of > convention before.

[HACKERS] confusing typedefs in jsonfuncs.c

2013-07-18 Thread Peter Eisentraut
The new jsonfuncs.c has some confusing typedef scheme. For example, it has a bunch of definitions like this: typedef struct getState { ... } getState, *GetState; So GetState is a pointer to getState. I have never seen that kind of convention before. This then leads to code like GetState