[geos-commits] [SCM] GEOS branch master updated. bfe6b8bb635163a96bfba7a17383eb386486ec60
git at osgeo.org
git at osgeo.org
Mon Oct 29 07:12:57 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, master has been updated
via bfe6b8bb635163a96bfba7a17383eb386486ec60 (commit)
from 67d6eafd9a95fdb9890bbcdce6ce85aab0c1dce2 (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 bfe6b8bb635163a96bfba7a17383eb386486ec60
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:
capi/geos_ts_c.cpp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list