[postgis-commits] svn - r3815 - trunk/postgis
postgis-commits at postgis.refractions.net
postgis-commits at postgis.refractions.net
Mon Mar 9 09:20:04 PDT 2009
Author: mcayland
Date: 2009-03-09 09:20:03 -0700 (Mon, 09 Mar 2009)
New Revision: 3815
Modified:
trunk/postgis/lwgeom_dump.c
Log:
Remove compile warnings from lwgeom_dump.c related to the removal of TupleDescGetSlot (we don't need to set the deprecated fields in FuncCallContext if we are using BuildTupleFromCStrings).
Modified: trunk/postgis/lwgeom_dump.c
===================================================================
--- trunk/postgis/lwgeom_dump.c 2009-03-09 15:34:00 UTC (rev 3814)
+++ trunk/postgis/lwgeom_dump.c 2009-03-09 16:20:03 UTC (rev 3815)
@@ -60,7 +60,6 @@
GEOMDUMPSTATE *state;
GEOMDUMPNODE *node;
TupleDesc tupdesc;
- TupleTableSlot *slot;
HeapTuple tuple;
AttInMetadata *attinmeta;
MemoryContext oldcontext, newcontext;
@@ -104,12 +103,6 @@
*/
tupdesc = RelationNameGetTupleDesc("geometry_dump");
- /* allocate a slot for a tuple with this tupdesc */
- slot = BlessTupleDesc(tupdesc);
-
- /* assign slot to function context */
- funcctx->slot = slot;
-
/*
* generate attribute metadata needed later to produce
* tuples from raw C strings
@@ -134,7 +127,7 @@
values[0] = "{}";
values[1] = lwgeom_to_hexwkb(state->root, PARSER_CHECK_NONE, -1);
tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
- result = TupleGetDatum(funcctx->slot, tuple);
+ result = HeapTupleGetDatum(tuple);
state->root = NULL;
SRF_RETURN_NEXT(funcctx, result);
@@ -207,7 +200,6 @@
FuncCallContext *funcctx;
struct POLYDUMPSTATE *state;
TupleDesc tupdesc;
- TupleTableSlot *slot;
HeapTuple tuple;
AttInMetadata *attinmeta;
MemoryContext oldcontext, newcontext;
@@ -244,12 +236,6 @@
*/
tupdesc = RelationNameGetTupleDesc("geometry_dump");
- /* allocate a slot for a tuple with this tupdesc */
- slot = BlessTupleDesc(tupdesc);
-
- /* assign slot to function context */
- funcctx->slot = slot;
-
/*
* generate attribute metadata needed later to produce
* tuples from raw C strings
@@ -297,7 +283,7 @@
MemoryContextSwitchTo(oldcontext);
tuple = BuildTupleFromCStrings(funcctx->attinmeta, values);
- result = TupleGetDatum(funcctx->slot, tuple);
+ result = HeapTupleGetDatum(tuple);
++state->ringnum;
SRF_RETURN_NEXT(funcctx, result);
}
More information about the postgis-commits
mailing list