On Wed, Apr 25, 2007 at 04:38:30PM -0400, Tom Lane wrote:
> My recommendation is to get rid of the APREF hack, deal only in
> va_list not &va_list, and inline ECPGget_variable into the two
> places it's used to avoid the question of passing va_lists around
> after they've been modified. The routine's not that big (especially
> seeing that only half of it is actually shared by the two callers)
> and it's just not worth the notational effort, let alone any portability
> risks, to factor it out.
Having spend countless hours debugging this stuff I fully agree with
you. It's not just ECPGget_variable though. I also had to inline
create_statement. This is only called once, so no big deal, but the
calling function gets bigger by quite a margin that way. It was
definitely easier to read with these functions, but again all this
hassle isn't worth it.
Attached you'll find a patch that should inline both functions and
remove the APREF stuff. This successfully runs the regression suite on
my Linux box. Please test it on those archs that needed special
treatment before I commit.
Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!