[SCM] PostGIS branch master updated. 3.6.0rc2-366-g67d1d0640

git at osgeo.org git at osgeo.org
Fri Mar 6 08:15:30 PST 2026


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  67d1d0640e2e01d1fff997372bf357250fecc90d (commit)
       via  17f698631baf0c3b4c63ec474fed51d9518a0e1a (commit)
      from  2cbc46f2915e694ec329407503574004c16311b9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 67d1d0640e2e01d1fff997372bf357250fecc90d
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Fri Mar 6 20:14:52 2026 +0400

    doc: fix comment SQL escaping and spell checks

diff --git a/.codespellrc b/.codespellrc
index 016dfb022..964a27237 100644
--- a/.codespellrc
+++ b/.codespellrc
@@ -1,3 +1,4 @@
 [codespell]
-skip = *.po,spatial_ref_sys.sql,./deps,./extensions/address_standardizer,./configure*,./autom4te.cache,./build-aux,./libtool,.git,build*
+# utils/check_spelling.sh builds a deterministic list of tracked files plus
+# generated comment SQL.
 ignore-words = .codespell.ignore
diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml
index 302aa40a1..617153b0b 100644
--- a/.github/workflows/codespell.yml
+++ b/.github/workflows/codespell.yml
@@ -21,9 +21,12 @@ jobs:
 
     - name: 'Install codespell'
       run: |
+        sudo apt-get update
+        sudo apt-get install -y --no-install-recommends libxml2-utils docbook-xml docbook-xsl docbook-xsl-ns xsltproc
         sudo pip install codespell
 
     - name: 'Build & Test'
       run: |
         codespell --version
-        codespell -I ".codespell.ignore"
+        make -C doc comments
+        ./utils/check_spelling.sh
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 1e0c2fb92..e468eed66 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -307,7 +307,7 @@ endif
 
 check-spell:
 ifneq (@CODESPELL@,)
-	cd $(top_srcdir) && @CODESPELL@
+	cd $(top_srcdir) && ./utils/check_spelling.sh @CODESPELL@
 else
 	@echo "SKIP: spell checking disabled"
 endif
diff --git a/doc/po/zh_Hans/postgis-manual.po b/doc/po/zh_Hans/postgis-manual.po
index d319ec99a..f571d2fcc 100644
--- a/doc/po/zh_Hans/postgis-manual.po
+++ b/doc/po/zh_Hans/postgis-manual.po
@@ -4346,7 +4346,7 @@ msgid ""
 "topogeometries created before the upgrade. This function fixes this "
 "corruption in affected tables."
 msgstr ""
-"从 PostGIS topology 版本 <3.6.0 升级到 >3.6.0+ 时,topogeometry "
+"从 PostGIS topology 版本 <3.6.0 升级到 >3.6.0+ 时,topogeometry "
 "列的定义发生了变化,导致升级前创建的 topogeometry "
 "数据出现损坏。这个函数用来修复受影响表中的这些损坏问题。"
 
diff --git a/doc/xsl/postgis_comments.sql.xsl b/doc/xsl/postgis_comments.sql.xsl
index 3e5333d2a..3e27ba993 100644
--- a/doc/xsl/postgis_comments.sql.xsl
+++ b/doc/xsl/postgis_comments.sql.xsl
@@ -22,6 +22,7 @@
 
         <xsl:template match="db:chapter">
 		<xsl:variable name="ap"><xsl:text>'</xsl:text></xsl:variable>
+		<xsl:variable name="apesc"><xsl:text>''</xsl:text></xsl:variable>
 <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 		<xsl:for-each select="db:section[not(contains(@xml:id,'Operator') or contains(@xml:id,'sfcgal') or contains(@xml:id,'GUC') )]/db:refentry">
 		  <xsl:variable name='plaincomment'>
@@ -32,7 +33,7 @@
 			<xsl:call-template name="globalReplace">
 				<xsl:with-param name="outputString" select="$plaincomment"/>
 				<xsl:with-param name="target" select="$ap"/>
-				<xsl:with-param name="replacement" select="''"/>
+				<xsl:with-param name="replacement" select="$apesc"/>
 			</xsl:call-template>
 		</xsl:variable>
 		<xsl:choose>
diff --git a/doc/xsl/raster_comments.sql.xsl b/doc/xsl/raster_comments.sql.xsl
index d9dd68970..450904c7d 100644
--- a/doc/xsl/raster_comments.sql.xsl
+++ b/doc/xsl/raster_comments.sql.xsl
@@ -24,6 +24,7 @@
 
         <xsl:template match="db:chapter">
 		<xsl:variable name="ap"><xsl:text>'</xsl:text></xsl:variable>
+		<xsl:variable name="apesc"><xsl:text>''</xsl:text></xsl:variable>
 <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 		<xsl:for-each select="db:section[not(contains(@xml:id,'Operator'))]/db:refentry">
 		  <xsl:variable name='plaincomment'>
@@ -34,7 +35,7 @@
 			<xsl:call-template name="globalReplace">
 				<xsl:with-param name="outputString" select="$plaincomment"/>
 				<xsl:with-param name="target" select="$ap"/>
-				<xsl:with-param name="replacement" select="''"/>
+				<xsl:with-param name="replacement" select="$apesc"/>
 			</xsl:call-template>
 		</xsl:variable>
 <!-- For each function prototype generate the DDL comment statement
@@ -51,6 +52,7 @@ COMMENT ON <xsl:choose><xsl:when test="contains(db:paramdef/db:type,'geometry se
 	<xsl:template match="db:section[contains(@xml:id, 'Type')]">
         <xsl:for-each select="db:refentry">
             <xsl:variable name="ap"><xsl:text>'</xsl:text></xsl:variable>
+            <xsl:variable name="apesc"><xsl:text>''</xsl:text></xsl:variable>
     <!-- If this is a raster type grab the ref entry summary and refname to make type comment -->
 
             <xsl:variable name='plaincomment'>
@@ -61,7 +63,7 @@ COMMENT ON <xsl:choose><xsl:when test="contains(db:paramdef/db:type,'geometry se
                 <xsl:call-template name="globalReplace">
                     <xsl:with-param name="outputString" select="$plaincomment"/>
                     <xsl:with-param name="target" select="$ap"/>
-                    <xsl:with-param name="replacement" select="''"/>
+                    <xsl:with-param name="replacement" select="$apesc"/>
                 </xsl:call-template>
             </xsl:variable>
     COMMENT ON TYPE <xsl:value-of select="db:refnamediv/db:refname" /> IS 'postgis raster type: <xsl:value-of select='$comment' />';
diff --git a/doc/xsl/sfcgal_comments.sql.xsl b/doc/xsl/sfcgal_comments.sql.xsl
index 6eb857037..116da9a30 100644
--- a/doc/xsl/sfcgal_comments.sql.xsl
+++ b/doc/xsl/sfcgal_comments.sql.xsl
@@ -23,6 +23,7 @@
 
         <xsl:template match="db:chapter">
 		<xsl:variable name="ap"><xsl:text>'</xsl:text></xsl:variable>
+		<xsl:variable name="apesc"><xsl:text>''</xsl:text></xsl:variable>
 <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 		<xsl:for-each select="db:section[not(contains(@xml:id,'Operator'))]/db:refentry">
 		  <xsl:variable name='plaincomment'>
@@ -33,7 +34,7 @@
 			<xsl:call-template name="globalReplace">
 				<xsl:with-param name="outputString" select="$plaincomment"/>
 				<xsl:with-param name="target" select="$ap"/>
-				<xsl:with-param name="replacement" select="''"/>
+				<xsl:with-param name="replacement" select="$apesc"/>
 			</xsl:call-template>
 		</xsl:variable>
 <!-- For each function prototype generate the DDL comment statement
diff --git a/doc/xsl/tiger_geocoder_comments.sql.xsl b/doc/xsl/tiger_geocoder_comments.sql.xsl
index 547e22747..4983947c9 100644
--- a/doc/xsl/tiger_geocoder_comments.sql.xsl
+++ b/doc/xsl/tiger_geocoder_comments.sql.xsl
@@ -23,6 +23,7 @@
 
         <xsl:template match="db:chapter">
 		<xsl:variable name="ap"><xsl:text>'</xsl:text></xsl:variable>
+		<xsl:variable name="apesc"><xsl:text>''</xsl:text></xsl:variable>
 <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 		<xsl:for-each select="db:section[@xml:id='Tiger_Geocoder']/db:refentry">
 		  <xsl:variable name='plaincomment'>
@@ -33,7 +34,7 @@
 			<xsl:call-template name="globalReplace">
 				<xsl:with-param name="outputString" select="$plaincomment"/>
 				<xsl:with-param name="target" select="$ap"/>
-				<xsl:with-param name="replacement" select="''"/>
+				<xsl:with-param name="replacement" select="$apesc"/>
 			</xsl:call-template>
 		</xsl:variable>
 <!-- For each function prototype generate the DDL comment statement
diff --git a/doc/xsl/topology_comments.sql.xsl b/doc/xsl/topology_comments.sql.xsl
index 5d67d8f15..68758a455 100644
--- a/doc/xsl/topology_comments.sql.xsl
+++ b/doc/xsl/topology_comments.sql.xsl
@@ -23,6 +23,7 @@
 
         <xsl:template match="db:chapter">
 		<xsl:variable name="ap"><xsl:text>'</xsl:text></xsl:variable>
+		<xsl:variable name="apesc"><xsl:text>''</xsl:text></xsl:variable>
 <!-- Pull out the purpose section for each ref entry and strip whitespace and put in a variable to be tagged unto each function comment  -->
 		<xsl:for-each select="db:section[not(contains(@xml:id,'Operator'))]/db:refentry">
 		  <xsl:variable name='plaincomment'>
@@ -33,7 +34,7 @@
 			<xsl:call-template name="globalReplace">
 				<xsl:with-param name="outputString" select="$plaincomment"/>
 				<xsl:with-param name="target" select="$ap"/>
-				<xsl:with-param name="replacement" select="''"/>
+				<xsl:with-param name="replacement" select="$apesc"/>
 			</xsl:call-template>
 		</xsl:variable>
 		<xsl:choose>
diff --git a/utils/check_spelling.sh b/utils/check_spelling.sh
new file mode 100755
index 000000000..5537675ed
--- /dev/null
+++ b/utils/check_spelling.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+set -eu
+
+CODESPELL=${1:-codespell}
+
+ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
+cd "$ROOT"
+
+tmpfiles=$(mktemp)
+trap 'rm -f "$tmpfiles"' EXIT HUP INT TERM
+
+# Keep the check deterministic by starting from tracked files and excluding
+# vendor data, generated trees, and authoritative datasets that are not prose.
+git ls-files -z -- . \
+	':(exclude)deps' \
+	':(exclude)extensions/address_standardizer' \
+	':(exclude)doc/html' \
+	':(exclude)doc/po' \
+	':(exclude)doc/postgis-out.xml' \
+	':(exclude)doc/postgis-nospecial.xml' \
+	':(exclude)aclocal.m4' \
+	':(exclude)configure' \
+	':(exclude)macros/libtool.m4' \
+	':(exclude)spatial_ref_sys.sql' \
+	':(exclude)extensions/postgis/sql/spatial_ref_sys.sql' \
+	':(glob,exclude)extensions/postgis/sql/postgis--*.sql' \
+	':(glob,exclude)**/*.po' \
+	> "$tmpfiles"
+
+# The comment SQL files are generated from the docs and shipped in release
+# artifacts, so include them when they exist.
+for generated in doc/postgis_comments.sql \
+	doc/raster_comments.sql \
+	doc/sfcgal_comments.sql \
+	doc/tiger_geocoder_comments.sql \
+	doc/topology_comments.sql
+do
+	if [ -f "$generated" ]; then
+		printf '%s\0' "$generated" >> "$tmpfiles"
+	fi
+done
+
+xargs -0 "$CODESPELL" --config .codespellrc < "$tmpfiles"

commit 17f698631baf0c3b4c63ec474fed51d9518a0e1a
Author: Darafei Praliaskouski <me at komzpa.net>
Date:   Fri Mar 6 19:45:36 2026 +0400

    geos: use fixed-width flags in signedness-sensitive paths

diff --git a/liblwgeom/cunit/cu_geos_cluster.c b/liblwgeom/cunit/cu_geos_cluster.c
index 78d8c35c9..20129f14b 100644
--- a/liblwgeom/cunit/cu_geos_cluster.c
+++ b/liblwgeom/cunit/cu_geos_cluster.c
@@ -22,7 +22,7 @@ static void assert_all_results_found(LWGEOM** results, size_t num_outputs, LWGEO
 {
 	size_t i, j;
 
-	char found_equal = 0;
+	uint8_t found_equal = 0;
 	for (i = 0; i < num_outputs; i++)
 	{
 		for (j = 0; j < num_expected_outputs; j++)
@@ -271,7 +271,7 @@ static void do_dbscan_test(struct dbscan_test_info test)
 	LWGEOM** geoms = WKTARRAY2LWGEOM(test.wkt_inputs, test.num_geoms);
 	UNIONFIND* uf = UF_create(test.num_geoms);
 	uint32_t* ids;
-	char* in_a_cluster;
+	uint8_t *in_a_cluster;
 	uint32_t i;
 
 	union_dbscan(geoms, test.num_geoms, uf, test.eps, test.min_points, &in_a_cluster);
diff --git a/liblwgeom/cunit/cu_unionfind.c b/liblwgeom/cunit/cu_unionfind.c
index 223129866..fb00dc5c1 100644
--- a/liblwgeom/cunit/cu_unionfind.c
+++ b/liblwgeom/cunit/cu_unionfind.c
@@ -66,7 +66,7 @@ static void test_unionfind_ordered_by_cluster(void)
 
 	uint32_t* ids_by_cluster = UF_ordered_by_cluster(&uf);
 
-	char encountered_cluster[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+	uint8_t encountered_cluster[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
 
 	uint32_t i;
 	for (i = 0; i < uf.N; i++)
@@ -147,7 +147,7 @@ static void test_unionfind_collapse_cluster_ids(void)
 
 	lwfree(collapsed_ids);
 
-	char is_in_cluster[] = { 0, 1, 1, 1, 0, 1, 0, 0, 0, 0 };
+	uint8_t is_in_cluster[] = {0, 1, 1, 1, 0, 1, 0, 0, 0, 0};
 	uint32_t expected_collapsed_ids2[] = { 8, 0, 0, 0, 7, 0, 8, 7, 8, 7 };
 
 	collapsed_ids = UF_get_collapsed_cluster_ids(uf, is_in_cluster);
diff --git a/liblwgeom/lwgeom_geos.c b/liblwgeom/lwgeom_geos.c
index e3fb18625..b42f1eb69 100644
--- a/liblwgeom/lwgeom_geos.c
+++ b/liblwgeom/lwgeom_geos.c
@@ -1776,7 +1776,7 @@ lwgeom_voronoi_diagram(const LWGEOM* g, const GBOX* env, double tolerance, int o
 {
 	uint32_t num_points = lwgeom_count_vertices(g);
 	LWGEOM* lwgeom_result;
-	char is_3d = LW_FALSE;
+	uint8_t is_3d = LW_FALSE;
 	int32_t srid = lwgeom_get_srid(g);
 	GEOSCoordSequence* coords;
 	GEOSGeometry* geos_geom;
diff --git a/liblwgeom/lwgeom_geos.h b/liblwgeom/lwgeom_geos.h
index 2d80819fb..f444cb6e5 100644
--- a/liblwgeom/lwgeom_geos.h
+++ b/liblwgeom/lwgeom_geos.h
@@ -46,7 +46,12 @@ int cluster_intersecting(GEOSGeometry **geoms, uint32_t num_geoms, GEOSGeometry
 int union_intersecting_pairs(GEOSGeometry** geoms, uint32_t num_geoms, UNIONFIND* uf);
 int union_related_pairs(GEOSGeometry** geoms, uint32_t num_geoms, const char* im, UNIONFIND* uf);
 int cluster_within_distance(LWGEOM **geoms, uint32_t num_geoms, double tolerance, LWGEOM ***clusterGeoms, uint32_t *num_clusters);
-int union_dbscan(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint32_t min_points, char **is_in_cluster_ret);
+int union_dbscan(LWGEOM **geoms,
+		 uint32_t num_geoms,
+		 UNIONFIND *uf,
+		 double eps,
+		 uint32_t min_points,
+		 uint8_t **is_in_cluster_ret);
 
 POINTARRAY* ptarray_from_GEOSCoordSeq(const GEOSCoordSequence* cs, uint8_t want3d);
 
diff --git a/liblwgeom/lwgeom_geos_cluster.c b/liblwgeom/lwgeom_geos_cluster.c
index 318d3558e..64ca68f5f 100644
--- a/liblwgeom/lwgeom_geos_cluster.c
+++ b/liblwgeom/lwgeom_geos_cluster.c
@@ -48,9 +48,14 @@ struct STRTree
 	uint32_t num_geoms;
 };
 
-static struct STRTree make_strtree(void** geoms, uint32_t num_geoms, char is_lwgeom);
+static struct STRTree make_strtree(void **geoms, uint32_t num_geoms, uint8_t is_lwgeom);
 static void destroy_strtree(struct STRTree * tree);
-static int combine_geometries(UNIONFIND* uf, void** geoms, uint32_t num_geoms, void*** clustersGeoms, uint32_t* num_clusters, char is_lwgeom);
+static int combine_geometries(UNIONFIND *uf,
+			      void **geoms,
+			      uint32_t num_geoms,
+			      void ***clustersGeoms,
+			      uint32_t *num_clusters,
+			      uint8_t is_lwgeom);
 
 /* Make a minimal GEOSGeometry* whose Envelope covers the same 2D extent as
  * the supplied GBOX.  This is faster and uses less memory than building a
@@ -77,7 +82,7 @@ geos_envelope_surrogate(const LWGEOM* g)
 /** Make a GEOSSTRtree that stores a pointer to a variable containing
  *  the array index of the input geoms */
 static struct STRTree
-make_strtree(void** geoms, uint32_t num_geoms, char is_lwgeom)
+make_strtree(void **geoms, uint32_t num_geoms, uint8_t is_lwgeom)
 {
 	struct STRTree tree;
 	tree.envelopes = 0;
@@ -385,7 +390,7 @@ dbscan_update_context(GEOSSTRtree* tree, struct QueryContext* cxt, LWGEOM** geom
  * Applicable to DBSCAN with minpoints > 1.
  */
 static void
-union_if_available(UNIONFIND* uf, uint32_t p, uint32_t q, char* is_in_core, char* in_a_cluster)
+union_if_available(UNIONFIND *uf, uint32_t p, uint32_t q, uint8_t *is_in_core, uint8_t *in_a_cluster)
 {
 	if (in_a_cluster[q])
 	{
@@ -411,7 +416,7 @@ union_if_available(UNIONFIND* uf, uint32_t p, uint32_t q, char* is_in_core, char
  * to avoid some distance computations altogether.
  */
 static int
-union_dbscan_minpoints_1(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double eps, char** in_a_cluster_ret)
+union_dbscan_minpoints_1(LWGEOM **geoms, uint32_t num_geoms, UNIONFIND *uf, double eps, uint8_t **in_a_cluster_ret)
 {
 	uint32_t p, i;
 	struct STRTree tree;
@@ -425,7 +430,7 @@ union_dbscan_minpoints_1(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, doub
 
 	if (in_a_cluster_ret)
 	{
-		char* in_a_cluster = lwalloc(num_geoms * sizeof(char));
+		uint8_t *in_a_cluster = lwalloc(num_geoms * sizeof(uint8_t));
 		for (i = 0; i < num_geoms; i++)
 			in_a_cluster[i] = LW_TRUE;
 		*in_a_cluster_ret = in_a_cluster;
@@ -481,7 +486,12 @@ union_dbscan_minpoints_1(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, doub
 }
 
 static int
-union_dbscan_general(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double eps, uint32_t min_points, char** in_a_cluster_ret)
+union_dbscan_general(LWGEOM **geoms,
+		     uint32_t num_geoms,
+		     UNIONFIND *uf,
+		     double eps,
+		     uint32_t min_points,
+		     uint8_t **in_a_cluster_ret)
 {
 	uint32_t p, i;
 	struct STRTree tree;
@@ -493,11 +503,11 @@ union_dbscan_general(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double e
 	};
 	int success = LW_SUCCESS;
 	uint32_t* neighbors;
-	char* in_a_cluster;
-	char* is_in_core;
+	uint8_t *in_a_cluster;
+	uint8_t *is_in_core;
 
-	in_a_cluster = lwalloc(num_geoms * sizeof(char));
-	memset(in_a_cluster, 0, num_geoms * sizeof(char));
+	in_a_cluster = lwalloc(num_geoms * sizeof(uint8_t));
+	memset(in_a_cluster, 0, num_geoms * sizeof(uint8_t));
 
 	if (in_a_cluster_ret)
 		*in_a_cluster_ret = in_a_cluster;
@@ -517,8 +527,8 @@ union_dbscan_general(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double e
 		return LW_FAILURE;
 	}
 
-	is_in_core = lwalloc(num_geoms * sizeof(char));
-	memset(is_in_core, 0, num_geoms * sizeof(char));
+	is_in_core = lwalloc(num_geoms * sizeof(uint8_t));
+	memset(is_in_core, 0, num_geoms * sizeof(uint8_t));
 	neighbors = lwalloc(min_points * sizeof(uint32_t));
 
 	for (p = 0; p < num_geoms; p++)
@@ -619,7 +629,13 @@ union_dbscan_general(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double e
 	return success;
 }
 
-int union_dbscan(LWGEOM** geoms, uint32_t num_geoms, UNIONFIND* uf, double eps, uint32_t min_points, char** in_a_cluster_ret)
+int
+union_dbscan(LWGEOM **geoms,
+	     uint32_t num_geoms,
+	     UNIONFIND *uf,
+	     double eps,
+	     uint32_t min_points,
+	     uint8_t **in_a_cluster_ret)
 {
 	if (min_points <= 1)
 		return union_dbscan_minpoints_1(geoms, num_geoms, uf, eps, in_a_cluster_ret);
@@ -651,7 +667,12 @@ cluster_within_distance(LWGEOM** geoms, uint32_t num_geoms, double tolerance, LW
  *  GeometryCollections.  Supplied geometry array may be of either LWGEOM* or GEOSGeometry*; is_lwgeom is used to
  *  identify which. Caller is responsible for freeing input geometry array but not the items contained within it. */
 static int
-combine_geometries(UNIONFIND* uf, void** geoms, uint32_t num_geoms, void*** clusterGeoms, uint32_t* num_clusters, char is_lwgeom)
+combine_geometries(UNIONFIND *uf,
+		   void **geoms,
+		   uint32_t num_geoms,
+		   void ***clusterGeoms,
+		   uint32_t *num_clusters,
+		   uint8_t is_lwgeom)
 {
 	size_t i, j, k;
 
diff --git a/liblwgeom/lwunionfind.c b/liblwgeom/lwunionfind.c
index 854a9e807..9ca47a1c3 100644
--- a/liblwgeom/lwunionfind.c
+++ b/liblwgeom/lwunionfind.c
@@ -142,13 +142,13 @@ UF_ordered_by_cluster(UNIONFIND* uf)
 	return ordered_ids;
 }
 
-uint32_t*
-UF_get_collapsed_cluster_ids(UNIONFIND* uf, const char* is_in_cluster)
+uint32_t *
+UF_get_collapsed_cluster_ids(UNIONFIND *uf, const uint8_t *is_in_cluster)
 {
 	uint32_t* ordered_components = UF_ordered_by_cluster(uf);
 	uint32_t* new_ids = lwalloc(uf->N * sizeof(uint32_t));
 	uint32_t last_old_id, current_new_id, i;
-	char encountered_cluster = LW_FALSE;
+	uint8_t encountered_cluster = LW_FALSE;
 
 	current_new_id = 0; last_old_id = 0;
 	for (i = 0; i < uf->N; i++)
diff --git a/liblwgeom/lwunionfind.h b/liblwgeom/lwunionfind.h
index 75e0ae788..8964a3671 100644
--- a/liblwgeom/lwunionfind.h
+++ b/liblwgeom/lwunionfind.h
@@ -57,5 +57,4 @@ uint32_t* UF_ordered_by_cluster(UNIONFIND* uf);
  * If is_in_cluster array is provided, it will be used to skip any indexes
  * that are not in a cluster.
  * */
-uint32_t* UF_get_collapsed_cluster_ids(UNIONFIND* uf, const char* is_in_cluster);
-
+uint32_t *UF_get_collapsed_cluster_ids(UNIONFIND *uf, const uint8_t *is_in_cluster);
diff --git a/postgis/lwgeom_geos.c b/postgis/lwgeom_geos.c
index 9b1ef3e0f..e93db0af7 100644
--- a/postgis/lwgeom_geos.c
+++ b/postgis/lwgeom_geos.c
@@ -1551,7 +1551,7 @@ Datum isvalid(PG_FUNCTION_ARGS)
 {
 	GSERIALIZED *geom1;
 	LWGEOM *lwgeom;
-	char result;
+	int8_t result;
 	GEOSGeom g1;
 
 	geom1 = PG_GETARG_GSERIALIZED_P(0);
@@ -1628,7 +1628,7 @@ Datum isvaliddetail(PG_FUNCTION_ARGS)
 	char *reason = NULL;
 	GEOSGeometry *geos_location = NULL;
 	LWGEOM *location = NULL;
-	char valid = 0;
+	int8_t valid = 0;
 	HeapTupleHeader result;
 	TupleDesc tupdesc;
 	HeapTuple tuple;
@@ -1706,7 +1706,7 @@ Datum issimple(PG_FUNCTION_ARGS)
 {
 	GSERIALIZED *geom;
 	LWGEOM *lwgeom_in;
-	int result;
+	int8_t result;
 
 	POSTGIS_DEBUG(2, "issimple called");
 
@@ -1732,7 +1732,7 @@ Datum isring(PG_FUNCTION_ARGS)
 {
 	GSERIALIZED *geom;
 	GEOSGeometry *g1;
-	int result;
+	int8_t result;
 
 	geom = PG_GETARG_GSERIALIZED_P(0);
 
@@ -1762,7 +1762,7 @@ Datum isring(PG_FUNCTION_ARGS)
 }
 
 GSERIALIZED *
-GEOS2POSTGIS(GEOSGeom geom, char want3d)
+GEOS2POSTGIS(GEOSGeom geom, uint8_t want3d)
 {
 	LWGEOM *lwgeom;
 	GSERIALIZED *result;
@@ -2662,7 +2662,7 @@ Datum LWGEOM_dfullywithin(PG_FUNCTION_ARGS)
 	double radius = PG_GETARG_FLOAT8(2);
 	GEOSGeometry *buffer1 = NULL;
 	GEOSGeometry *geos1 = NULL, *geos2 = NULL;
-	char contained;
+	int8_t contained;
 
 	if (radius < 0.0)
 	{
diff --git a/postgis/lwgeom_geos.h b/postgis/lwgeom_geos.h
index 07707c459..1fdc58e83 100644
--- a/postgis/lwgeom_geos.h
+++ b/postgis/lwgeom_geos.h
@@ -34,7 +34,7 @@
 ** Public prototypes for GEOS utility functions.
 */
 
-GSERIALIZED *GEOS2POSTGIS(GEOSGeom geom, char want3d);
+GSERIALIZED *GEOS2POSTGIS(GEOSGeom geom, uint8_t want3d);
 GEOSGeometry *POSTGIS2GEOS(const GSERIALIZED *g);
 GEOSGeometry** ARRAY2GEOS(ArrayType* array, uint32_t nelems, int* is3d, int* srid);
 LWGEOM** ARRAY2LWGEOM(ArrayType* array, uint32_t nelems, int* is3d, int* srid);
diff --git a/postgis/lwgeom_geos_predicates.c b/postgis/lwgeom_geos_predicates.c
index 1219117f8..87d34a694 100644
--- a/postgis/lwgeom_geos_predicates.c
+++ b/postgis/lwgeom_geos_predicates.c
@@ -65,8 +65,8 @@ Datum ST_Equals(PG_FUNCTION_ARGS);
 /*
  * Utility to quickly check for polygonal geometries
  */
-static inline char
-is_poly(const GSERIALIZED* g)
+static inline uint8_t
+is_poly(const GSERIALIZED *g)
 {
     int type = gserialized_get_type(g);
     return type == POLYGONTYPE || type == MULTIPOLYGONTYPE;
@@ -75,8 +75,8 @@ is_poly(const GSERIALIZED* g)
 /*
  * Utility to quickly check for point geometries
  */
-static inline char
-is_point(const GSERIALIZED* g)
+static inline uint8_t
+is_point(const GSERIALIZED *g)
 {
 	int type = gserialized_get_type(g);
 	return type == POINTTYPE || type == MULTIPOINTTYPE;
@@ -95,7 +95,7 @@ Datum ST_Intersects(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	int result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -174,7 +174,7 @@ Datum ST_Equals(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	char result;
+	int8_t result;
 	GBOX box1, box2;
 	GEOSGeometry *g1, *g2;
 
@@ -233,7 +233,7 @@ Datum touches(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	char result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -297,7 +297,7 @@ Datum disjoint(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	char result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -365,7 +365,7 @@ Datum overlaps(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	char result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -432,7 +432,7 @@ Datum crosses(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	int result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -500,7 +500,7 @@ Datum contains(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	int result;
+	int8_t result;
 	GEOSGeometry *g1, *g2;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
@@ -581,7 +581,7 @@ Datum within(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	int result;
+	int8_t result;
 	GEOSGeometry *g1, *g2;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
@@ -661,7 +661,7 @@ Datum containsproperly(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	char result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -726,7 +726,7 @@ Datum covers(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	int result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -810,7 +810,7 @@ Datum coveredby(PG_FUNCTION_ARGS)
 	SHARED_GSERIALIZED *shared_geom2 = ToastCacheGetGeometry(fcinfo, 1);
 	const GSERIALIZED *geom1 = shared_gserialized_get(shared_geom1);
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
-	int result;
+	int8_t result;
 	GBOX box1, box2;
 	PrepGeomCache *prep_cache;
 
@@ -909,7 +909,7 @@ Datum relate_pattern(PG_FUNCTION_ARGS)
 	text *imPtr = DatumGetTextP(DirectFunctionCall2(text_left,
 		PG_GETARG_DATUM(2), Int32GetDatum(9)));
 	char *im = text_to_cstring(imPtr);
-	char result;
+	int8_t result;
 	uint32_t i;
 #if POSTGIS_GEOS_VERSION >= 31300
 	PrepGeomCache *prep_cache;
@@ -1045,7 +1045,7 @@ Datum LWGEOM_dwithin(PG_FUNCTION_ARGS)
 	const GSERIALIZED *geom2 = shared_gserialized_get(shared_geom2);
 	PrepGeomCache *prep_cache = NULL;
 	const size_t small_threshold = 1024;
-	char is_dwithin = -1;
+	int8_t is_dwithin = -1;
 
 	/*
 	 * Only enter the GEOS/PreparedGeometry code line if one of the
@@ -1103,5 +1103,3 @@ Datum LWGEOM_dwithin(PG_FUNCTION_ARGS)
 
 	PG_RETURN_BOOL(is_dwithin);
 }
-
-
diff --git a/postgis/lwgeom_window.c b/postgis/lwgeom_window.c
index 4e931af53..409b94503 100644
--- a/postgis/lwgeom_window.c
+++ b/postgis/lwgeom_window.c
@@ -49,14 +49,14 @@ typedef struct {
 typedef struct
 {
 	uint32_t cluster_id;
-	char is_null;        /* NULL may result from a NULL geometry input, or it may be used by
-							algorithms such as DBSCAN that do not assign all inputs to a
-							cluster. */
+	uint8_t is_null; /* NULL may result from a NULL geometry input, or it may be used by
+							 algorithms such as DBSCAN that do not assign all inputs to a
+							 cluster. */
 } cluster_entry;
 
 typedef struct
 {
-	char is_error;
+	uint8_t is_error;
 	cluster_entry clusters[1];
 } cluster_context;
 
@@ -129,7 +129,7 @@ Datum ST_ClusterDBSCAN(PG_FUNCTION_ARGS)
 		uint32_t i;
 		uint32_t* result_ids;
 		LWGEOM** geoms;
-		char* is_in_cluster = NULL;
+		uint8_t *is_in_cluster = NULL;
 		UNIONFIND* uf;
 		bool tolerance_is_null;
 		bool minpoints_is_null;
@@ -1035,5 +1035,3 @@ Datum ST_CoverageUnion(PG_FUNCTION_ARGS)
 
 	PG_RETURN_POINTER(result);
 }
-
-

-----------------------------------------------------------------------

Summary of changes:
 .codespellrc                            |  3 +-
 .github/workflows/codespell.yml         |  5 +++-
 GNUmakefile.in                          |  2 +-
 doc/po/zh_Hans/postgis-manual.po        |  2 +-
 doc/xsl/postgis_comments.sql.xsl        |  3 +-
 doc/xsl/raster_comments.sql.xsl         |  6 ++--
 doc/xsl/sfcgal_comments.sql.xsl         |  3 +-
 doc/xsl/tiger_geocoder_comments.sql.xsl |  3 +-
 doc/xsl/topology_comments.sql.xsl       |  3 +-
 liblwgeom/cunit/cu_geos_cluster.c       |  4 +--
 liblwgeom/cunit/cu_unionfind.c          |  4 +--
 liblwgeom/lwgeom_geos.c                 |  2 +-
 liblwgeom/lwgeom_geos.h                 |  7 ++++-
 liblwgeom/lwgeom_geos_cluster.c         | 51 +++++++++++++++++++++++----------
 liblwgeom/lwunionfind.c                 |  6 ++--
 liblwgeom/lwunionfind.h                 |  3 +-
 postgis/lwgeom_geos.c                   | 12 ++++----
 postgis/lwgeom_geos.h                   |  2 +-
 postgis/lwgeom_geos_predicates.c        | 36 +++++++++++------------
 postgis/lwgeom_window.c                 | 12 ++++----
 utils/check_spelling.sh                 | 44 ++++++++++++++++++++++++++++
 21 files changed, 144 insertions(+), 69 deletions(-)
 create mode 100755 utils/check_spelling.sh


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list