From: Paul Ramsey Date: Fri, 3 Oct 2008 17:37:42 +0000 (+0000) Subject: Patch up and comment out some DEBUGF lines that don't compile due to changes in function X-Git-Tag: 1.4.0b1~659 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd0ce72f9b99b2e21076f4dba5492cb075df43ea;p=postgis Patch up and comment out some DEBUGF lines that don't compile due to changes in function signatures in liblwgeom git-svn-id: http://svn.osgeo.org/postgis/trunk@3061 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/lwgeom/lwgeom_geos_c.c b/lwgeom/lwgeom_geos_c.c index bc67f844c..56f8efc2b 100644 --- a/lwgeom/lwgeom_geos_c.c +++ b/lwgeom/lwgeom_geos_c.c @@ -3168,7 +3168,9 @@ Datum GEOSnoop(PG_FUNCTION_ARGS) geom = (PG_LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0)); + /* TODO: serialized_lwgeom_to_ewkt doesn't return string, this needs fixing POSTGIS_DEBUGF(2, "GEOSnoop: IN: %s", serialized_lwgeom_to_ewkt(SERIALIZED_FORM(geom), PARSER_CHECK_NONE)); + */ geosgeom = POSTGIS2GEOS(geom); if ( ! geosgeom ) PG_RETURN_NULL(); @@ -3181,8 +3183,10 @@ Datum GEOSnoop(PG_FUNCTION_ARGS) result = GEOS2POSTGIS(geosgeom, TYPE_HASZ(geom->type)); GEOSGeom_destroy(geosgeom); + /* TODO: serialized_lwgeom_to_ewkt doesn't return string, this needs fixing POSTGIS_DEBUGF(4, "GEOSnoop: OUT: %s", serialized_lwgeom_to_ewkt(SERIALIZED_FORM(result), PARSER_CHECK_NONE)); - + */ + PG_FREE_IF_COPY(geom, 0); PG_RETURN_POINTER(result); @@ -3636,7 +3640,7 @@ PreparedCacheDelete(MemoryContext context) if (!pghe) elog(ERROR, "PreparedCacheDelete: Trying to delete non-existant hash entry object with MemoryContext key (%p)", (void *)context); - LWDEBUGF(3, "deleting geom object (%p) and prepared geom object (%p) with MemoryContext key (%p)", pghe.geom, pghe.prepared_geom, context); + LWDEBUGF(3, "deleting geom object (%p) and prepared geom object (%p) with MemoryContext key (%p)", pghe->geom, pghe->prepared_geom, context); /* Free them */ if( pghe->prepared_geom ) diff --git a/lwgeom/lwgeom_gist.c b/lwgeom/lwgeom_gist.c index 10e461eca..005c798c8 100644 --- a/lwgeom/lwgeom_gist.c +++ b/lwgeom/lwgeom_gist.c @@ -465,8 +465,10 @@ Datum LWGEOM_gist_compress(PG_FUNCTION_ARGS) /* lwgeom serialized form */ in = (PG_LWGEOM*)PG_DETOAST_DATUM(entry->key); + /* TODO, fix this, serialized_lwgeom_to_wkt doesn't return string anymore, returns status POSTGIS_DEBUGF(4, "GIST: LWGEOM_gist_compress detoasted entry->key: %s", serialized_lwgeom_to_ewkt((uchar *)in+VARHDRSZ, PARSER_CHECK_NONE)); - + */ + if (in == NULL) { elog(ERROR, "PG_DETOAST_DATUM() returned NULL ??"); diff --git a/lwgeom/lwgeom_inout.c b/lwgeom/lwgeom_inout.c index bc36002a0..d4ef4affa 100644 --- a/lwgeom/lwgeom_inout.c +++ b/lwgeom/lwgeom_inout.c @@ -313,7 +313,7 @@ Datum WKBFromLWGEOM(PG_FUNCTION_ARGS) #endif LWDEBUGF(3, "Output size is %lu (comp: %lu)", - VARSIZE(lwgeom_result), (unsigned long)size); + VARSIZE(lwgeom_result), (unsigned long)size_result); PG_RETURN_POINTER(lwgeom_result); }