[cairo-commit] roadster/src import_tiger.c, 1.12, 1.13 location.c,
1.1, 1.2 locationset.c, 1.6, 1.7 map.c, 1.22, 1.23 point.c,
1.1, 1.2 pointstring.c, 1.2, 1.3 track.c, 1.3, 1.4
Ian McIntosh
commit at pdx.freedesktop.org
Sun Mar 13 11:11:59 PST 2005
Committed by: ian
Update of /cvs/cairo/roadster/src
In directory gabe:/tmp/cvs-serv12571/src
Modified Files:
import_tiger.c location.c locationset.c map.c point.c
pointstring.c track.c
Log Message:
* src/point.c:
* src/track.c:
* src/location.c:
* src/locationset.c:
* src/pointstring.c: Change name of chunk allocators (just the text name used for debugging).
* src/pointstring.c: Pass TRUE to g_ptr_array_free to free array memory. Properly free pointstring name.
* src/import_tiger.c: Pass TRUE to g_ptr_array_free to free array memory.
* src/map.c: Add assertion that cleanup behaves as expected.
Index: import_tiger.c
===================================================================
RCS file: /cvs/cairo/roadster/src/import_tiger.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- import_tiger.c 10 Mar 2005 06:12:03 -0000 1.12
+++ import_tiger.c 13 Mar 2005 19:11:57 -0000 1.13
@@ -818,7 +818,7 @@
azZIPCodeLeft, azZIPCodeRight,
pTempPointsArray, &nRoadID);
}
- g_ptr_array_free(pTempPointsArray, FALSE);
+ g_ptr_array_free(pTempPointsArray, TRUE);
}
typedef enum {
@@ -1014,7 +1014,7 @@
}
}
- g_ptr_array_free(pTempPointsArray, FALSE);
+ g_ptr_array_free(pTempPointsArray, TRUE);
// we SHOULD have used all RT1 links up!
if(pRecordRTi->m_pRT1LinksArray->len > 0) {
Index: location.c
===================================================================
RCS file: /cvs/cairo/roadster/src/location.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- location.c 8 Mar 2005 18:40:50 -0000 1.1
+++ location.c 13 Mar 2005 19:11:57 -0000 1.2
@@ -31,7 +31,7 @@
void location_init()
{
- g_Location.m_pLocationChunkAllocator = g_mem_chunk_new("location chunk allocator",
+ g_Location.m_pLocationChunkAllocator = g_mem_chunk_new("ROADSTER locations",
sizeof(location_t), 1000, G_ALLOC_AND_FREE);
g_return_if_fail(g_Location.m_pLocationChunkAllocator != NULL);
}
Index: locationset.c
===================================================================
RCS file: /cvs/cairo/roadster/src/locationset.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- locationset.c 10 Mar 2005 06:12:03 -0000 1.6
+++ locationset.c 13 Mar 2005 19:11:57 -0000 1.7
@@ -44,7 +44,7 @@
g_LocationSet.m_pLocationSetHash = g_hash_table_new(g_int_hash, g_int_equal);
// create memory allocator
- g_LocationSet.m_pLocationSetChunkAllocator = g_mem_chunk_new("locationset chunk allocator",
+ g_LocationSet.m_pLocationSetChunkAllocator = g_mem_chunk_new("ROADSTER locationsets",
sizeof(locationset_t), 1000, G_ALLOC_AND_FREE);
g_return_if_fail(g_LocationSet.m_pLocationSetChunkAllocator != NULL);
}
@@ -155,6 +155,8 @@
// reads points in given rect into memory
gboolean locationset_load_locations(maprect_t* pRect)
{
+ g_assert_not_reached(); // not used/tested
+
// TIMER_BEGIN(mytimer, "BEGIN POINT LOAD");
//~ // g_return_val_if_fail(pGeometrySet != NULL, FALSE);
Index: map.c
===================================================================
RCS file: /cvs/cairo/roadster/src/map.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- map.c 10 Mar 2005 19:18:09 -0000 1.22
+++ map.c 13 Mar 2005 19:11:57 -0000 1.23
@@ -582,6 +582,7 @@
pointstring_t* pPointString = g_ptr_array_remove_index_fast(pLayerData->m_pPointStringsArray, j);
pointstring_free(pPointString);
}
+ g_assert(pLayerData->m_pPointStringsArray->len == 0);
}
}
Index: point.c
===================================================================
RCS file: /cvs/cairo/roadster/src/point.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- point.c 26 Feb 2005 04:41:40 -0000 1.1
+++ point.c 13 Mar 2005 19:11:57 -0000 1.2
@@ -30,7 +30,7 @@
void point_init(void)
{
// create memory allocators
- g_pPointChunkAllocator = g_mem_chunk_new("point chunk allocator",
+ g_pPointChunkAllocator = g_mem_chunk_new("ROADSTER points",
sizeof(mappoint_t), 1000, G_ALLOC_AND_FREE);
g_return_if_fail(g_pPointChunkAllocator != NULL);
}
Index: pointstring.c
===================================================================
RCS file: /cvs/cairo/roadster/src/pointstring.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- pointstring.c 28 Feb 2005 03:25:23 -0000 1.2
+++ pointstring.c 13 Mar 2005 19:11:57 -0000 1.3
@@ -30,7 +30,7 @@
void pointstring_init(void)
{
- g_pPointStringChunkAllocator = g_mem_chunk_new("pointstring chunk allocator",
+ g_pPointStringChunkAllocator = g_mem_chunk_new("ROADSTER pointstrings",
sizeof(pointstring_t), 1000, G_ALLOC_AND_FREE);
g_return_if_fail(g_pPointStringChunkAllocator != NULL);
}
@@ -66,6 +66,10 @@
mappoint_t* pPoint = g_ptr_array_remove_index_fast(pPointString->m_pPointsArray, i);
point_free(pPoint);
}
+ g_assert(pPointString->m_pPointsArray->len == 0);
+
+ g_ptr_array_free(pPointString->m_pPointsArray, TRUE);
+ g_free(pPointString->m_pszName);
g_mem_chunk_free(g_pPointStringChunkAllocator, pPointString);
}
Index: track.c
===================================================================
RCS file: /cvs/cairo/roadster/src/track.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- track.c 7 Mar 2005 23:31:41 -0000 1.3
+++ track.c 13 Mar 2005 19:11:57 -0000 1.4
@@ -43,7 +43,7 @@
void track_init(void)
{
g_Tracks.m_pTracksHash = g_hash_table_new(g_int_hash, g_int_equal);
- g_Tracks.g_pTrackChunkAllocator = g_mem_chunk_new("track chunk allocator",
+ g_Tracks.g_pTrackChunkAllocator = g_mem_chunk_new("ROADSTER tracks",
sizeof(track_t), 1000, G_ALLOC_AND_FREE);
g_return_if_fail(g_Tracks.g_pTrackChunkAllocator != NULL);
}
More information about the cairo-commit
mailing list