Re: pgindent issue with EXEC_BACKEND-only typedefs - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pgindent issue with EXEC_BACKEND-only typedefs
Date
Msg-id 200712211429.lBLET4k24567@momjian.us
Whole thread Raw
In response to Re: pgindent issue with EXEC_BACKEND-only typedefs  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: pgindent issue with EXEC_BACKEND-only typedefs
List pgsql-hackers
Alvaro Herrera wrote:
> Tom Lane wrote:
> > Alvaro Herrera <alvherre@commandprompt.com> writes:
> > > I don't know how to make it output the symbol names like it seems to do
> > > for you.
> > 
> > I dislike the object-file-based approach altogether, not least because
> > it appears to depend on unportable aspects of someBSD's objdump.
> > 
> > Surely there's some code out there that can find typedef names from the
> > source files?  Why does pgindent even need to be told this?
> 
> indent needs the typedef list.  Maybe we can hack something based on
> typedefs in the source code, instead of object files.

I am worried it will be too hard to find typedefs in complex cases where
the typedef name is embedded:
typedef void (*ClosePtr) (struct _archiveHandle * AH);

The only think of is to grab typedefs from the object file and then also
try to get them from the souce too and combine them and remove duplicates.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://postgres.enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pgindent issue with EXEC_BACKEND-only typedefs
Next
From: "Pavel Stehule"
Date:
Subject: Re: function body actors (was: [PERFORM] viewing source code)