aboutsummaryrefslogtreecommitdiff
path: root/src/backend/lib/lispsort.c
diff options
context:
space:
mode:
authorNeil Conway <neilc@samurai.com>2004-04-25 18:23:57 +0000
committerNeil Conway <neilc@samurai.com>2004-04-25 18:23:57 +0000
commit1812d3b233e40d6e94e2105c3da4b1fca93c9385 (patch)
tree8e121bc3cc1d8951e7c94f1c590296bae80765bd /src/backend/lib/lispsort.c
parenta3015829ee0ec22917a5e1a6ee3432fa8ef3a811 (diff)
downloadpostgresql-1812d3b233e40d6e94e2105c3da4b1fca93c9385.tar.gz
postgresql-1812d3b233e40d6e94e2105c3da4b1fca93c9385.zip
Remove the last traces of Joe Hellerstein's "xfunc" optimization. Patch
from Alvaro Herrera. Also, removed lispsort.c, since it is no longer used.
Diffstat (limited to 'src/backend/lib/lispsort.c')
-rw-r--r--src/backend/lib/lispsort.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/src/backend/lib/lispsort.c b/src/backend/lib/lispsort.c
deleted file mode 100644
index 7de12b0c6dd..00000000000
--- a/src/backend/lib/lispsort.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * lispsort.c
- *
- * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- *
- * IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/lib/lispsort.c,v 1.20 2003/11/29 19:51:49 pgsql Exp $
- *
- *-------------------------------------------------------------------------
- */
-
-#include "postgres.h"
-
-
-#ifdef NOT_USED
-/*
-** lisp_qsort: Takes a lisp list as input, copies it into an array of lisp
-** nodes which it sorts via qsort() with the comparison function
-** as passed into lisp_qsort(), and returns a new list with
-** the nodes sorted. The old list is *not* freed or modified (?)
-*/
-List *
-lisp_qsort(List *the_list, /* the list to be sorted */
- int (*compare) ()) /* function to compare two nodes */
-{
- int i;
- size_t num;
- List **nodearray;
- List *tmp,
- *output;
-
- /* find size of list */
- num = length(the_list);
- if (num < 2)
- return copyObject(the_list);
-
- /* copy elements of the list into an array */
- nodearray = (List **) palloc(num * sizeof(List *));
-
- for (tmp = the_list, i = 0; tmp != NIL; tmp = lnext(tmp), i++)
- nodearray[i] = copyObject(lfirst(tmp));
-
- /* sort the array */
- pg_qsort(nodearray, num, sizeof(List *), compare);
-
- /* lcons together the array elements */
- output = NIL;
- for (i = num - 1; i >= 0; i--)
- output = lcons(nodearray[i], output);
-
- return output;
-}
-
-#endif