use new List API names

Started by Neil Conwayover 22 years ago5 messagespatches
Jump to latest
#1Neil Conway
neilc@samurai.com

This patch updates the remaining parts of the source tree to use the
new List API function names and disables the list compatibility API
by default. This patch compiles without warnings and passes the
regression tests.

This patch does not remove the usage of FastList; that should also
be done.

Barring any objections, I intend to apply this patch on Sunday
evening (PDT).

-Neil

Attachments:

list-rewrite-updates-15.patch.gzapplication/x-gzip; name=list-rewrite-updates-15.patch.gz; x-mac-creator=0; x-mac-type=0Download+0-1
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#1)
Re: use new List API names

Neil Conway <neilc@samurai.com> writes:

This patch updates the remaining parts of the source tree to use the
new List API function names and disables the list compatibility API
by default. This patch compiles without warnings and passes the
regression tests.

I thought llast() and length() were going away too?

This patch does not remove the usage of FastList; that should also
be done.

I can deal with that later ...

regards, tom lane

#3Neil Conway
neilc@samurai.com
In reply to: Tom Lane (#2)
Re: use new List API names

Tom Lane wrote:

I thought llast() and length() were going away too?

For llast(), I decided to keep it around: it is nicely symmetric
with linitial(), and it makes any code that actually needs the last
value in a list significantly more readable. Since it's a macro
there's no runtime cost.

I had thought about keeping length() around, but on second thought I
don't see why we ought to. I'll replace it with list_length() and
post an updated patch.

-Neil

#4Neil Conway
neilc@samurai.com
In reply to: Neil Conway (#3)
Re: use new List API names

Neil Conway wrote:

I had thought about keeping length() around, but on second thought I
don't see why we ought to. I'll replace it with list_length() and post
an updated patch.

The revised patch is attached.

-Neil

Attachments:

list-rewrite-updates-17.patch.gzapplication/x-gzip; name=list-rewrite-updates-17.patch.gz; x-mac-creator=0; x-mac-type=0Download
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#3)
Re: use new List API names

Neil Conway <neilc@samurai.com> writes:

Tom Lane wrote:

I thought llast() and length() were going away too?

For llast(), I decided to keep it around: it is nicely symmetric
with linitial(), and it makes any code that actually needs the last
value in a list significantly more readable. Since it's a macro
there's no runtime cost.

I had thought about keeping length() around, but on second thought I
don't see why we ought to. I'll replace it with list_length() and
post an updated patch.

Okay, that works for me.

regards, tom lane