diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-13 07:35:40 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2000-06-13 07:35:40 +0000 |
commit | f2d120532207b8873a5e74e7350dd2904f377289 (patch) | |
tree | 992c89e023c4b29b42bf4fd6563de91f8d6ec8ca /src/backend/access/rtree/rtproc.c | |
parent | 8f057d971d663fff9bbb2ae7d053bf71cf09b4a2 (diff) |
Another batch of fmgr updates. I think I have gotten all old-style
functions that take pass-by-value datatypes. Should be ready for
port testing ...
Diffstat (limited to 'src/backend/access/rtree/rtproc.c')
-rw-r--r-- | src/backend/access/rtree/rtproc.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/backend/access/rtree/rtproc.c b/src/backend/access/rtree/rtproc.c index 6b571c7d4af..df410045c2d 100644 --- a/src/backend/access/rtree/rtproc.c +++ b/src/backend/access/rtree/rtproc.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.25 2000/01/26 05:56:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtproc.c,v 1.26 2000/06/13 07:34:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -102,13 +102,15 @@ rt_poly_union(POLYGON *a, POLYGON *b) return p; } -void -rt_poly_size(POLYGON *a, float *size) +Datum +rt_poly_size(PG_FUNCTION_ARGS) { + POLYGON *a = PG_GETARG_POLYGON_P(0); + /* NB: size is an output argument */ + float *size = (float *) PG_GETARG_POINTER(1); double xdim, ydim; - size = (float *) palloc(sizeof(float)); if (a == (POLYGON *) NULL || a->boundbox.high.x <= a->boundbox.low.x || a->boundbox.high.y <= a->boundbox.low.y) @@ -121,7 +123,7 @@ rt_poly_size(POLYGON *a, float *size) *size = (float) (xdim * ydim); } - return; + PG_RETURN_POINTER(NULL); /* no real return value */ } POLYGON * |