[geos-commits] r2974 - in trunk: . capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Sat Apr 17 11:34:55 EDT 2010
Author: strk
Date: 2010-04-17 11:34:55 -0400 (Sat, 17 Apr 2010)
New Revision: 2974
Modified:
trunk/NEWS
trunk/capi/geos_c.cpp
Log:
Have initGEOS(..) return a singleton, as used to be up to 3.0.0
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-04-07 14:01:45 UTC (rev 2973)
+++ trunk/NEWS 2010-04-17 15:34:55 UTC (rev 2974)
@@ -18,6 +18,7 @@
- Bug fixes:
- Invalid compound geometries reported as valid (#333)
- Return up to 15 digits of precision from GEOSisValidReason_t (#329)
+ - CAPI: do not leak contexts when using the non-reentrant interface
Changes in 3.2.0
Modified: trunk/capi/geos_c.cpp
===================================================================
--- trunk/capi/geos_c.cpp 2010-04-07 14:01:45 UTC (rev 2973)
+++ trunk/capi/geos_c.cpp 2010-04-17 15:34:55 UTC (rev 2974)
@@ -88,7 +88,15 @@
void
initGEOS (GEOSMessageHandler nf, GEOSMessageHandler ef)
{
- handle = initGEOS_r( nf, ef );
+ if ( ! handle )
+ {
+ handle = initGEOS_r( nf, ef );
+ }
+ else
+ {
+ GEOSContext_setNoticeHandler_r(handle, nf);
+ GEOSContext_setErrorHandler_r(handle, ef);
+ }
}
void
More information about the geos-commits
mailing list