Backport the implementation of gtk_list_store_iter_is_valid from gtk+-3. Index: gtk+-2.24.33/gtk/gtkliststore.c =================================================================== --- gtk+-2.24.33.orig/gtk/gtkliststore.c +++ gtk+-2.24.33/gtk/gtkliststore.c @@ -1195,16 +1195,31 @@ gboolean gtk_list_store_iter_is_valid (GtkListStore *list_store, GtkTreeIter *iter) { + GSequenceIter *seq_iter; + g_return_val_if_fail (GTK_IS_LIST_STORE (list_store), FALSE); g_return_val_if_fail (iter != NULL, FALSE); - if (!VALID_ITER (iter, list_store)) - return FALSE; + /* can't use VALID_ITER() here, because iter might point + * to random memory. + * + * We MUST NOT dereference it. + */ - if (g_sequence_iter_get_sequence (iter->user_data) != list_store->seq) + if (iter == NULL || + iter->user_data == NULL || + list_store->stamp != iter->stamp) return FALSE; - return TRUE; + for (seq_iter = g_sequence_get_begin_iter (list_store->seq); + !g_sequence_iter_is_end (seq_iter); + seq_iter = g_sequence_iter_next (seq_iter)) + { + if (seq_iter == iter->user_data) + return TRUE; + } + + return FALSE; } static gboolean real_gtk_list_store_row_draggable (GtkTreeDragSource *drag_source, 066a7e2423e7f3a2'>treecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2024-04-02 12:19:27 +0300
committerEfraim Flashner <efraim@flashner.co.il>2024-07-19 00:46:51 +0300
commit864bf7cc7388b39958d65bd7066a7e2423e7f3a2 (patch)
tree242bf9e595518f0e094efbf97c9e551e7adcfaab /gnu/packages
parent98da7cbe6831f0482e9d767c0b0eda268ea188ae (diff)
downloadguix-864bf7cc7388b39958d65bd7066a7e2423e7f3a2.tar.gz
guix-864bf7cc7388b39958d65bd7066a7e2423e7f3a2.zip
gnu: rust-phf-macros-0.9: Downgrade to 0.9.0.
Later versions of this crate are yanked by upstream. * gnu/packages/crates-io.scm (rust-phf-macros-0.9): Downgrade to 0.9.0. [cargo-development-inputs]: Replace rust-phf-0.9 with 0.8. Change-Id: I0fd5e2bf0e0c4ff32279a6b0359a3eb1dbf1c9ff
Diffstat (limited to 'gnu/packages')