[geos-commits] [SCM] GEOS branch master updated. 92ec0d5198a1ec3fd7afdfa5569b51f8ddd741af

git at osgeo.org git at osgeo.org
Thu Feb 13 06:53:17 PST 2020

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 "GEOS".

The branch, master has been updated
       via  92ec0d5198a1ec3fd7afdfa5569b51f8ddd741af (commit)
       via  8ba2c1819504d6e9d30ee6400701952ca6955d98 (commit)
      from  c5b75f576a60cad8c7ae9fc48e90b22a783cad4c (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 92ec0d5198a1ec3fd7afdfa5569b51f8ddd741af
Merge: c5b75f5 8ba2c18
Author: Dan Baston <dbaston at gmail.com>
Date:   Thu Feb 13 09:52:58 2020 -0500

    Merge remote-tracking branch 'rouault/fix_mismatch_struct_class_variant2'

commit 8ba2c1819504d6e9d30ee6400701952ca6955d98
Author: Even Rouault <even.rouault at spatialys.com>
Date:   Thu Feb 13 09:14:07 2020 +0100

    Fix -Wmismatched-tags warning related to WK[T/B][Reader/Writer]
    CLang 9 -Wextra warns about
    ./geos_c.h:1226:9: warning: struct 'WKTReader' was previously declared as a class; this is valid, but may result in linker errors under the Microsoft C++ ABI [-Wmismatched-tags]
    typedef struct GEOSWKTReader_t GEOSWKTReader;
    ../../include/geos/io/WKTReader.h:58:16: note: previous use is here
    class GEOS_DLL WKTReader {
    ./geos_c.h:1226:9: note: did you mean class here?
    typedef struct GEOSWKTReader_t GEOSWKTReader;
    Similarly for WKTWriter, WKBReader and WKBWriter
    This is due to capi/geos_c.cpp having a
     #define GEOSWKTReader_t geos::io::WKTReader
    Adopt the same solution as for GEOSGeom and other C++ classes
    exposed in C API

diff --git a/capi/geos_c.cpp b/capi/geos_c.cpp
index ad8584f..acf5cb3 100644
--- a/capi/geos_c.cpp
+++ b/capi/geos_c.cpp
@@ -39,10 +39,10 @@
 #define GEOSPreparedGeometry geos::geom::prep::PreparedGeometry
 #define GEOSCoordSequence geos::geom::CoordinateSequence
 #define GEOSSTRtree geos::index::strtree::STRtree
-#define GEOSWKTReader_t geos::io::WKTReader
-#define GEOSWKTWriter_t geos::io::WKTWriter
-#define GEOSWKBReader_t geos::io::WKBReader
-#define GEOSWKBWriter_t geos::io::WKBWriter
+#define GEOSWKTReader geos::io::WKTReader
+#define GEOSWKTWriter geos::io::WKTWriter
+#define GEOSWKBReader geos::io::WKBReader
+#define GEOSWKBWriter geos::io::WKBWriter
 typedef struct GEOSBufParams_t GEOSBufferParams;
 #include "geos_c.h"
diff --git a/capi/geos_c.h.in b/capi/geos_c.h.in
index 31da35e..0de0be1 100644
--- a/capi/geos_c.h.in
+++ b/capi/geos_c.h.in
@@ -1223,11 +1223,12 @@ extern int GEOS_DLL GEOSOrientationIndex_r(GEOSContextHandle_t handle,
+#ifndef GEOSWKTReader
 typedef struct GEOSWKTReader_t GEOSWKTReader;
 typedef struct GEOSWKTWriter_t GEOSWKTWriter;
 typedef struct GEOSWKBReader_t GEOSWKBReader;
 typedef struct GEOSWKBWriter_t GEOSWKBWriter;
 /* WKT Reader */
 extern GEOSWKTReader GEOS_DLL *GEOSWKTReader_create_r(


Summary of changes:
 capi/geos_c.cpp  | 8 ++++----
 capi/geos_c.h.in | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)


More information about the geos-commits mailing list