[SCM] PostGIS branch master updated. 3.4.0rc1-1094-g4ab5c0acc

git at osgeo.org git at osgeo.org
Tue Apr 23 06:26:17 PDT 2024


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  4ab5c0acc20e1361dbc562985b39c08cc9bdd908 (commit)
      from  9a746f869c5486706b08bf60d35a0c61d923888d (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 4ab5c0acc20e1361dbc562985b39c08cc9bdd908
Author: Sandro Santilli <strk at kbt.io>
Date:   Tue Apr 23 15:25:39 2024 +0200

    Handle WKT in formatted geometry debug too
    
    Completes what started with 9c2efa9175a5c2c1ca5a42974c07a05506aabc7b

diff --git a/liblwgeom/lwgeom_log.h b/liblwgeom/lwgeom_log.h
index 22ea89e81..ca65a17db 100644
--- a/liblwgeom/lwgeom_log.h
+++ b/liblwgeom/lwgeom_log.h
@@ -53,7 +53,7 @@
         } while (0);
 
 #ifdef POSTGIS_DEBUG_GEOMETRY_WKB
-/* Display a notice and a WKT representation of a geometry
+/* Display a notice and a HEXWKB representation of a geometry
  * at the given debug level */
 #define LWDEBUGG(level, geom, msg) \
   if (POSTGIS_DEBUG_LEVEL >= level) \
@@ -62,7 +62,16 @@
     LWDEBUGF(level, msg ": %s", wkt); \
     lwfree(wkt); \
   } while (0);
-#else
+/* Display a formatted notice and a HEXWKB representation of a geometry
+ * at the given debug level */
+#define LWDEBUGGF(level, geom, fmt, ...) \
+  if (POSTGIS_DEBUG_LEVEL >= level) \
+  do { \
+    char *wkt = lwgeom_to_hexwkb_buffer(geom, WKT_EXTENDED); \
+    LWDEBUGF(level, fmt ": %s", __VA_ARGS__, wkt); \
+    lwfree(wkt); \
+  } while (0);
+#else /* ndef POSTGIS_DEBUG_GEOMETRY_WKB */
 /* Display a notice and an HEXWKB representation of a geometry
  * at the given debug level */
 #define LWDEBUGG(level, geom, msg) \
@@ -73,8 +82,6 @@
     LWDEBUGF(level, msg ": %s", wkt); \
     lwfree(wkt); \
   } while (0);
-#endif
-
 /* Display a formatted notice and a WKT representation of a geometry
  * at the given debug level */
 #define LWDEBUGGF(level, geom, fmt, ...) \
@@ -82,10 +89,10 @@
   do { \
     size_t sz; \
     char *wkt = lwgeom_to_wkt(geom, WKT_EXTENDED, 15, &sz); \
-    /* char *wkt = lwgeom_to_hexwkb(geom, WKT_EXTENDED, &sz); */ \
     LWDEBUGF(level, fmt ": %s", __VA_ARGS__, wkt); \
     lwfree(wkt); \
   } while (0);
+#endif
 
 #else /* POSTGIS_DEBUG_LEVEL <= 0 */
 

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

Summary of changes:
 liblwgeom/lwgeom_log.h | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list