From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgindent issue with EXEC_BACKEND-only typedefs |
Date: | 2007-12-21 21:06:15 |
Message-ID: | 200712212106.lBLL6F419477@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Alvaro Herrera wrote:
> >> indent needs the typedef list. Maybe we can hack something based on
> >> typedefs in the source code, instead of object files.
>
> > 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.
>
> Something I noticed the other day is that pgindent doesn't seem to treat
> "struct foo" or "union foo" as a type name, which is pretty silly
> because no context is needed at all to recognize that. We tend not to
> do that too much --- the project style is to use a typedef name --- but
> there are some places that do it, particularly the regex code. For
> instance there are extra spaces here:
>
> static void
> cmtreefree(struct colormap * cm,
> union tree * tree,
> int level) /* level number (top == 0) of this block */
> {
>
> Fixable?
Yes, I found those are 't' STABS rather than "T" which are used in cases
where you do typedef struct {} name. The next pgindent will have those
typedefs you want.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://postgres.enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-12-21 21:19:51 | Re: function body actors (was: [PERFORM] viewing source code) |
Previous Message | Andrew Sullivan | 2007-12-21 20:56:19 | Re: function body actors (was: [PERFORM] viewing source code) |