Re: bool abuse in path_encode()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: bool abuse in path_encode()
Date: 2013-07-07 03:33:14
Message-ID: 3351.1373167994@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> The function path_encode() in geo_ops.c takes an argument "bool closed",
> to indicate an open or closed path --- but you can also pass -1 to
> indicate "neither".

Egad :-(.

> I propose to change this to an enum to make the
> code clearer and less weird.

Please change the "default" cases to be "case PATH_NONE", then.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robins Tharakan 2013-07-07 03:49:23 Re: Add regression tests for DISCARD
Previous Message Robins Tharakan 2013-07-07 03:25:51 Re: Add regression tests for ROLE (USER)