forked from AuroraMiddleware/gtk
Merge branch 'ebassi/issue-4543' into 'main'
Add a boxed GType for GtkBitsetIter Closes #4543 See merge request GNOME/gtk!4253
This commit is contained in:
commit
075e954b71
@ -756,6 +756,24 @@ gtk_bitset_splice (GtkBitset *self,
|
||||
|
||||
G_STATIC_ASSERT (sizeof (GtkBitsetIter) >= sizeof (roaring_uint32_iterator_t));
|
||||
|
||||
static GtkBitsetIter *
|
||||
gtk_bitset_iter_copy (GtkBitsetIter *iter)
|
||||
{
|
||||
roaring_uint32_iterator_t *riter = (roaring_uint32_iterator_t *) iter;
|
||||
|
||||
return (GtkBitsetIter *) roaring_copy_uint32_iterator (riter);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_bitset_iter_free (GtkBitsetIter *iter)
|
||||
{
|
||||
roaring_uint32_iterator_t *riter = (roaring_uint32_iterator_t *) iter;
|
||||
|
||||
roaring_free_uint32_iterator (riter);
|
||||
}
|
||||
|
||||
G_DEFINE_BOXED_TYPE (GtkBitsetIter, gtk_bitset_iter, gtk_bitset_iter_copy, gtk_bitset_iter_free)
|
||||
|
||||
/**
|
||||
* gtk_bitset_iter_init_first:
|
||||
* @iter: (out): a pointer to an uninitialized `GtkBitsetIter`
|
||||
|
@ -148,6 +148,9 @@ struct _GtkBitsetIter
|
||||
gpointer private_data[10];
|
||||
};
|
||||
|
||||
GDK_AVAILABLE_IN_4_6
|
||||
GType gtk_bitset_iter_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_bitset_iter_init_first (GtkBitsetIter *iter,
|
||||
const GtkBitset *set,
|
||||
@ -172,8 +175,6 @@ guint gtk_bitset_iter_get_value (const GtkBitset
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gtk_bitset_iter_is_valid (const GtkBitsetIter *iter);
|
||||
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GTK_BITSET_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user