Commit 840d9bab authored by Soren Sandmann's avatar Soren Sandmann Committed by Søren Sandmann Pedersen

Don't prohibit access until after the g_sequence_move_range() call. Bug

2007-02-05  Soren Sandmann <sandmann@daimi.au.dk>

	* glib/gsequence.c (g_sequence_sort_iter): Don't prohibit access
	until after the g_sequence_move_range() call.  Bug 404759,
	Christian Persch.

       * tests/sequence-test.c: Formatting fix.


svn path=/trunk/; revision=5325
parent 7e240f7e
2007-02-05 Soren Sandmann <sandmann@daimi.au.dk>
* glib/gsequence.c (g_sequence_sort_iter): Don't prohibit access
until after the g_sequence_move_range() call. Bug 404759,
Christian Persch.
* tests/sequence-test.c: Formatting fix.
2007-02-03 Soren Sandmann <sandmann@daimi.au.dk>
* glib/gsequence.c (struct _GSequence): Add a new 'real_sequence'
......
......@@ -709,12 +709,12 @@ g_sequence_sort_iter (GSequence *seq,
tmp = g_sequence_new (NULL);
tmp->real_sequence = seq;
tmp->access_prohibited = TRUE;
seq->access_prohibited = TRUE;
g_sequence_move_range (g_sequence_get_begin_iter (tmp), begin, end);
seq->access_prohibited = TRUE;
tmp->access_prohibited = TRUE;
while (g_sequence_get_length (tmp) > 0)
{
GSequenceNode *node = g_sequence_get_begin_iter (tmp);
......
......@@ -517,8 +517,7 @@ run_random_tests (guint32 seed)
for (i = 0; i < 15; ++i)
{
GSequenceIter *iter =
g_sequence_insert_sorted (
seq->sequence, new_item(seq), compare_items, NULL);
g_sequence_insert_sorted (seq->sequence, new_item(seq), compare_items, NULL);
g_queue_insert_sorted (seq->queue, iter, compare_iters, NULL);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment