[geos-commits] r3222 - trunk/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Feb 15 12:35:14 EST 2011


Author: mloskot
Date: 2011-02-15 09:35:14 -0800 (Tue, 15 Feb 2011)
New Revision: 3222

Modified:
   trunk/capi/geos_ts_c.cpp
Log:
gstrdup may throw since r3088 thus should no longer be declared as C function

Modified: trunk/capi/geos_ts_c.cpp
===================================================================
--- trunk/capi/geos_ts_c.cpp	2011-02-15 15:24:36 UTC (rev 3221)
+++ trunk/capi/geos_ts_c.cpp	2011-02-15 17:35:14 UTC (rev 3222)
@@ -151,7 +151,7 @@
 extern "C" const char GEOS_DLL *GEOSjtsport();
 extern "C" char GEOS_DLL *GEOSasText(Geometry *g1);
 
-extern "C" {
+namespace { // anonymous
 
 char* gstrdup_s(const char* str, const std::size_t size)
 {
@@ -178,7 +178,10 @@
     return gstrdup_s(str.c_str(), str.size());
 }
 
+} // namespace anonymous
 
+extern "C" {
+
 GEOSContextHandle_t
 initGEOS_r(GEOSMessageHandler nf, GEOSMessageHandler ef)
 {



More information about the geos-commits mailing list