Re: typedef struct LogicalDecodingContext

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: typedef struct LogicalDecodingContext
Date: 2023-03-01 23:04:50
Message-ID: 1769065.1677711890@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Smith <smithpb2250(at)gmail(dot)com> writes:
> AFAICT just by pre-declaring the typedef struct
> LogicalDecodingContext, all of those 'struct LogicalDecodingContext'
> can be culled, resulting in cleaner and more consistent function
> signatures.

Sadly, this is almost certainly going to cause bitching on the part of
some compilers, because depending on the order of header inclusions
they are going to see multiple typedefs for the same name. Redundant
"struct foo" declarations are portable C, but redundant "typedef foo"
not so much.

I also wonder if this passes headerscheck and cpluspluscheck.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-03-01 23:13:04 Re: stopgap fix for signal handling during restore_command
Previous Message Tom Lane 2023-03-01 22:59:45 Re: Making empty Bitmapsets always be NULL