Re: linked list rewrite
Bruce Momjian <pgman@candle.pha.pa.us>
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Neil Conway <neilc@samurai.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2004-04-28T04:12:21Z
Lists: pgsql-hackers
Tom Lane wrote: > Neil Conway <neilc@samurai.com> writes: > > Most of your suggestions are agreeable; a few minor quibbles follow. > > >> lfirstcell new function to get first cell, or NULL if none > > [...] > >> llastnode llastcell > > > What do you think of list_head() and list_tail() instead? > > No strong objection, though I thought it was a good idea to include > "cell" in the function names to suggest that what you are getting back > is just a cell and not a List. Anyone else have a preference? I never liked "cell" myself. It is too vague to me. But I see your point that list_head you would think returns the head of the list, not the first element in the list. Maybe list_first and list_last? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073