+
+ seq->access_prohibited = FALSE;
+
+ return node;
+}
+
+/**
+ * g_sequence_lookup_iter:
+ * @seq: a #GSequence
+ * @data: data to lookup
+ * @iter_cmp: the function used to compare iterators in the sequence
+ * @cmp_data: user data passed to @iter_cmp
+ *
+ * Like g_sequence_lookup(), but uses a #GSequenceIterCompareFunc
+ * instead of a #GCompareDataFunc as the compare function.
+ *
+ * @iter_cmp is called with two iterators pointing into @seq.
+ * It should return 0 if the iterators are equal, a negative value
+ * if the first iterator comes before the second, and a positive
+ * value if the second iterator comes before the first.
+ *
+ * This function will fail if the data contained in the sequence is
+ * unsorted. Use g_sequence_insert_sorted() or
+ * g_sequence_insert_sorted_iter() to add data to your sequence or, if
+ * you want to add a large amount of data, call g_sequence_sort() after
+ * doing unsorted insertions.
+ *
+ * Returns: an #GSequenceIter pointing to the position of
+ * the first item found equal to @data according to @cmp_func
+ * and @cmp_data, or %NULL if no such item exists
+ *
+ * Since: 2.28
+ */
+GSequenceIter *
+g_sequence_lookup_iter (GSequence *seq,
+ gpointer data,
+ GSequenceIterCompareFunc iter_cmp,
+ gpointer cmp_data)
+{
+ GSequenceNode *node;
+ GSequenceNode *dummy;
+ GSequence *tmp_seq;
+
+ g_return_val_if_fail (seq != NULL, NULL);
+
+ check_seq_access (seq);
+
+ seq->access_prohibited = TRUE;
+
+ tmp_seq = g_sequence_new (NULL);
+ tmp_seq->real_sequence = seq;
+
+ dummy = g_sequence_append (tmp_seq, data);
+
+ node = node_find (seq->end_node, dummy,
+ seq->end_node, iter_cmp, cmp_data);
+
+ g_sequence_free (tmp_seq);
+