From: Sandro Santilli Date: Mon, 11 Jul 2011 17:03:15 +0000 (+0000) Subject: Change ST_OffsetCurve parameters type from cstrin to text. See ticket #1117. X-Git-Tag: 2.0.0alpha1~1213 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7f115eefd5f0861192df7c4f2a70065a231f9a05;p=postgis Change ST_OffsetCurve parameters type from cstrin to text. See ticket #1117. git-svn-id: http://svn.osgeo.org/postgis/trunk@7629 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c index c5c1cbf6d..27099960d 100644 --- a/postgis/lwgeom_geos.c +++ b/postgis/lwgeom_geos.c @@ -1438,7 +1438,11 @@ Datum offsetcurve(PG_FUNCTION_ARGS) if (nargs > 2) { /* We strdup `cause we're going to modify it */ - params = pstrdup(PG_GETARG_CSTRING(2)); + { + text *wkttext = PG_GETARG_TEXT_P(2); + params = text2cstring(wkttext); + } + /*params = pstrdup(PG_GETARG_CSTRING(2)); */ POSTGIS_DEBUGF(3, "Params: %s", params); diff --git a/postgis/postgis.sql.in.c b/postgis/postgis.sql.in.c index 2fa2ac7f8..c1d5510f6 100644 --- a/postgis/postgis.sql.in.c +++ b/postgis/postgis.sql.in.c @@ -2698,7 +2698,7 @@ CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8,text) LANGUAGE 'SQL' IMMUTABLE STRICT; -- Availability: 2.0.0 - requires GEOS-3.2 or higher -CREATE OR REPLACE FUNCTION ST_OffsetCurve(line geometry, distance float8, params cstring DEFAULT '') +CREATE OR REPLACE FUNCTION ST_OffsetCurve(line geometry, distance float8, params text DEFAULT '') RETURNS geometry AS 'MODULE_PATHNAME','offsetcurve' LANGUAGE 'C' IMMUTABLE STRICT