[geos-commits] [SCM] GEOS branch 3.7 updated. 17d246b75c2e8bfa468ec04edfb2b7aa10780d94

git at osgeo.org git at osgeo.org
Mon Oct 29 07:15:38 PDT 2018


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, 3.7 has been updated
       via  17d246b75c2e8bfa468ec04edfb2b7aa10780d94 (commit)
       via  038813ea1d28a57eae4c2f9adb03db2c24e000d0 (commit)
      from  1b1e11d1ea07b9f5c8fb6feca2ffd5a0c881a22c (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 17d246b75c2e8bfa468ec04edfb2b7aa10780d94
Author: Daniel Baston <dbaston at gmail.com>
Date:   Mon Oct 29 10:15:26 2018 -0400

    Add NEWS entry for #941

diff --git a/NEWS b/NEWS
index 71d7e2e..59bc181 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ Changes in 3.7.1
     (#928, Sergey Fedoseev)
   - Reduce required autoconf to 2.63
     (#56, John Harvey)
+  - Fix incorrect return values on error from GEOSLength
+    GEOSisValidDetail (#941, Dan Baston)
 
 
 3.7.0 changes

commit 038813ea1d28a57eae4c2f9adb03db2c24e000d0
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sat Oct 27 15:20:11 2018 -0400

    Fix incorrect error return values in CAPI
    
    Fixes #941

diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 47cda5a..e824b15 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -419,7 +419,7 @@ GEOSFree_r (GEOSContextHandle_t extHandle, void* buffer)
 
 //-----------------------------------------------------------
 // relate()-related functions
-//  return 0 = false, 1 = true, 2 = error occured
+//  return 0 = false, 1 = true, 2 = error occurred
 //-----------------------------------------------------------
 
 char
@@ -1016,14 +1016,14 @@ GEOSisValidDetail_r(GEOSContextHandle_t extHandle, const Geometry *g,
 {
     if ( 0 == extHandle )
     {
-        return 0;
+        return 2;
     }
 
     GEOSContextHandleInternal_t *handle = 0;
     handle = reinterpret_cast<GEOSContextHandleInternal_t*>(extHandle);
     if ( 0 == handle->initialized )
     {
-        return 0;
+        return 2;
     }
 
     try
@@ -1378,7 +1378,7 @@ GEOSLength_r(GEOSContextHandle_t extHandle, const Geometry *g, double *length)
 
     if ( 0 == extHandle )
     {
-        return 2;
+        return 0;
     }
 
     GEOSContextHandleInternal_t *handle = 0;

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

Summary of changes:
 NEWS               | 2 ++
 capi/geos_ts_c.cpp | 8 ++++----
 2 files changed, 6 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list