Re: bool abuse in path_encode() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: bool abuse in path_encode()
Date
Msg-id 3351.1373167994@sss.pgh.pa.us
Whole thread Raw
In response to bool abuse in path_encode()  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.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



pgsql-hackers by date:

Previous
From: Robins Tharakan
Date:
Subject: Re: Add regression tests for ROLE (USER)
Next
From: Robins Tharakan
Date:
Subject: Re: Add regression tests for DISCARD