]> granicus.if.org Git - postgis/commitdiff
Change ST_OffsetCurve parameters type from cstrin to text. See ticket #1117.
authorSandro Santilli <strk@keybit.net>
Mon, 11 Jul 2011 17:03:15 +0000 (17:03 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 11 Jul 2011 17:03:15 +0000 (17:03 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@7629 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_geos.c
postgis/postgis.sql.in.c

index c5c1cbf6d4bf0a7c4064103d7ef7022d36ae322a..27099960d5adc5346c89d2dbbbcaafc7952597ca 100644 (file)
@@ -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);
 
index 2fa2ac7f80a765a883471ace6c5501451dbd5cee..c1d5510f6a8fa5236bfd3e10d7b23b0c56d88187 100644 (file)
@@ -2698,7 +2698,7 @@ CREATE OR REPLACE FUNCTION ST_Buffer(geometry,float8,text)
        LANGUAGE 'SQL' IMMUTABLE STRICT;\r
 \r
 -- Availability: 2.0.0 - requires GEOS-3.2 or higher\r
-CREATE OR REPLACE FUNCTION ST_OffsetCurve(line geometry, distance float8, params cstring DEFAULT '')\r
+CREATE OR REPLACE FUNCTION ST_OffsetCurve(line geometry, distance float8, params text DEFAULT '')\r
        RETURNS geometry\r
        AS 'MODULE_PATHNAME','offsetcurve'\r
        LANGUAGE 'C' IMMUTABLE STRICT\r