summaryrefslogtreecommitdiff
path: root/src/backend/access/rtree/rtget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/rtree/rtget.c')
-rw-r--r--src/backend/access/rtree/rtget.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/access/rtree/rtget.c b/src/backend/access/rtree/rtget.c
index 5b99e807f6f..8854163def9 100644
--- a/src/backend/access/rtree/rtget.c
+++ b/src/backend/access/rtree/rtget.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.20 2000/01/26 05:56:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.21 2000/06/13 07:34:48 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -28,21 +28,23 @@ static RetrieveIndexResult rtnext(IndexScanDesc s, ScanDirection dir);
static ItemPointer rtheapptr(Relation r, ItemPointer itemp);
-RetrieveIndexResult
-rtgettuple(IndexScanDesc s, ScanDirection dir)
+Datum
+rtgettuple(PG_FUNCTION_ARGS)
{
+ IndexScanDesc s = (IndexScanDesc) PG_GETARG_POINTER(0);
+ ScanDirection dir = (ScanDirection) PG_GETARG_INT32(1);
RetrieveIndexResult res;
/* if we have it cached in the scan desc, just return the value */
if ((res = rtscancache(s, dir)) != (RetrieveIndexResult) NULL)
- return res;
+ PG_RETURN_POINTER(res);
/* not cached, so we'll have to do some work */
if (ItemPointerIsValid(&(s->currentItemData)))
res = rtnext(s, dir);
else
res = rtfirst(s, dir);
- return res;
+ PG_RETURN_POINTER(res);
}
static RetrieveIndexResult