| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Greg Stark <gsstark(at)mit(dot)edu> |
| Cc: | Kurt Roeckx <Q(at)ping(dot)be>, pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Walker/mutator prototype. |
| Date: | 2003-12-14 23:45:01 |
| Message-ID: | 3603.1071445501@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Greg Stark <gsstark(at)mit(dot)edu> writes:
> Kurt Roeckx <Q(at)ping(dot)be> writes:
>> I did start by changing all the context's to void *, but you'll
>> loose the real type that it gets called with, so the other calls
>> will not generate warnings anymore because of wrong type.
> But at least you'll get a warning if someone passes a non-pointer or an
> incorrect number of arguments altogether.
Note that in practice, the walker/mutator routines are not called from
random places, but by a *very* small number of macros used in clauses.c.
Thus, the probability that someone will introduce a bug into the call
sites is small, and the probability that they'd not discover it
instantly is even smaller.
Given that consideration, I don't see what the point is of trying to
tighten these prototypes. ISTM it adds notational clutter for
essentially zero gain.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2003-12-14 23:53:22 | Re: fork/exec patch |
| Previous Message | Andrew Dunstan | 2003-12-14 23:43:54 | Re: [PATCHES] fork/exec patch |