[geos-commits] r3636 - in trunk: capi include/geos/util src/util
tests/unit/capi
svn_geos at osgeo.org
svn_geos at osgeo.org
Wed May 23 19:03:35 EDT 2012
Author: mloskot
Date: 2012-05-23 16:03:34 -0700 (Wed, 23 May 2012)
New Revision: 3636
Modified:
trunk/capi/geos_c.h.in
trunk/capi/geos_ts_c.cpp
trunk/include/geos/util/CustomAllocators.h
trunk/src/util/CustomAllocators.cpp
trunk/tests/unit/capi/GEOSCustomAllocatorTest.cpp
Log:
Renamed Freer to Deallocator
Modified: trunk/capi/geos_c.h.in
===================================================================
--- trunk/capi/geos_c.h.in 2012-05-23 22:57:51 UTC (rev 3635)
+++ trunk/capi/geos_c.h.in 2012-05-23 23:03:34 UTC (rev 3636)
@@ -138,7 +138,7 @@
typedef void (*GEOSQueryCallback)(void *item, void *userdata);
typedef void * (*GEOSAllocator) (size_t size);
-typedef void (*GEOSFreer) (void *ptr);
+typedef void (*GEOSDeallocator) (void *ptr);
/************************************************************************
*
@@ -152,7 +152,7 @@
GEOSMessageHandler error_function);
extern void GEOS_DLL finishGEOS(void);
extern GEOSAllocator GEOS_DLL GEOS_setAllocator(GEOSAllocator nf);
-extern GEOSFreer GEOS_DLL GEOS_setFreer(GEOSFreer nf);
+extern GEOSDeallocator GEOS_DLL GEOS_setDeallocator(GEOSDeallocator nf);
extern GEOSContextHandle_t GEOS_DLL initGEOS_r(
Modified: trunk/capi/geos_ts_c.cpp
===================================================================
--- trunk/capi/geos_ts_c.cpp 2012-05-23 22:57:51 UTC (rev 3635)
+++ trunk/capi/geos_ts_c.cpp 2012-05-23 23:03:34 UTC (rev 3636)
@@ -159,10 +159,10 @@
// --- Custom memory allocators -------------------------------- {
using geos::util::CustomAllocators::GEOSAllocator;
-using geos::util::CustomAllocators::GEOSFreer;
+using geos::util::CustomAllocators::GEOSDeallocator;
GEOSAllocator geos_alloc = std::malloc;
-GEOSFreer geos_free = std::free;
+GEOSDeallocator geos_free = std::free;
GEOSAllocator
GEOS_setAllocator(GEOSAllocator nf)
@@ -173,12 +173,12 @@
return of;
}
-GEOSFreer
-GEOS_setFreer(GEOSFreer nf)
+GEOSDeallocator
+GEOS_setDeallocator(GEOSDeallocator nf)
{
- GEOSFreer of = geos_free;
+ GEOSDeallocator of = geos_free;
geos_free = nf;
- geos::util::CustomAllocators::setFreer(geos_free);
+ geos::util::CustomAllocators::setDeallocator(geos_free);
return of;
}
Modified: trunk/include/geos/util/CustomAllocators.h
===================================================================
--- trunk/include/geos/util/CustomAllocators.h 2012-05-23 22:57:51 UTC (rev 3635)
+++ trunk/include/geos/util/CustomAllocators.h 2012-05-23 23:03:34 UTC (rev 3636)
@@ -21,8 +21,8 @@
typedef void * (*GEOSAllocator) (std::size_t size);
GEOSAllocator setAllocator(GEOSAllocator nf);
- typedef void (*GEOSFreer) (void *ptr);
- GEOSFreer setFreer(GEOSFreer nf);
+ typedef void (*GEOSDeallocator) (void *ptr);
+ GEOSDeallocator setDeallocator(GEOSDeallocator nf);
}
}
Modified: trunk/src/util/CustomAllocators.cpp
===================================================================
--- trunk/src/util/CustomAllocators.cpp 2012-05-23 22:57:51 UTC (rev 3635)
+++ trunk/src/util/CustomAllocators.cpp 2012-05-23 23:03:34 UTC (rev 3636)
@@ -23,7 +23,7 @@
namespace CustomAllocators {
GEOSAllocator geos_alloc = std::malloc;
-GEOSFreer geos_free = std::free;
+GEOSDeallocator geos_free = std::free;
GEOSAllocator
setAllocator(GEOSAllocator nf)
@@ -33,10 +33,10 @@
return of;
}
-GEOSFreer
-setFreer(GEOSFreer nf)
+GEOSDeallocator
+setDeallocator(GEOSDeallocator nf)
{
- GEOSFreer of = geos_free;
+ GEOSDeallocator of = geos_free;
geos_free = nf;
return of;
}
Modified: trunk/tests/unit/capi/GEOSCustomAllocatorTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSCustomAllocatorTest.cpp 2012-05-23 22:57:51 UTC (rev 3635)
+++ trunk/tests/unit/capi/GEOSCustomAllocatorTest.cpp 2012-05-23 23:03:34 UTC (rev 3636)
@@ -52,7 +52,7 @@
test_capicustomallocators_data()
{
GEOS_setAllocator(t_alloc);
- GEOS_setFreer(t_free);
+ GEOS_setDeallocator(t_free);
}
~test_capicustomallocators_data()
More information about the geos-commits
mailing list