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
@ -546,7 +546,7 @@ gtk_bitset_union (GtkBitset *self,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (self != NULL);
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (other != NULL);
|
g_return_if_fail (other != NULL);
|
||||||
|
|
||||||
if (self == other)
|
if (self == other)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -571,7 +571,7 @@ gtk_bitset_intersect (GtkBitset *self,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (self != NULL);
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (other != NULL);
|
g_return_if_fail (other != NULL);
|
||||||
|
|
||||||
if (self == other)
|
if (self == other)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -596,7 +596,7 @@ gtk_bitset_subtract (GtkBitset *self,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (self != NULL);
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (other != NULL);
|
g_return_if_fail (other != NULL);
|
||||||
|
|
||||||
if (self == other)
|
if (self == other)
|
||||||
{
|
{
|
||||||
roaring_bitmap_clear (&self->roaring);
|
roaring_bitmap_clear (&self->roaring);
|
||||||
@ -626,7 +626,7 @@ gtk_bitset_difference (GtkBitset *self,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (self != NULL);
|
g_return_if_fail (self != NULL);
|
||||||
g_return_if_fail (other != NULL);
|
g_return_if_fail (other != NULL);
|
||||||
|
|
||||||
if (self == other)
|
if (self == other)
|
||||||
{
|
{
|
||||||
roaring_bitmap_clear (&self->roaring);
|
roaring_bitmap_clear (&self->roaring);
|
||||||
@ -756,6 +756,24 @@ gtk_bitset_splice (GtkBitset *self,
|
|||||||
|
|
||||||
G_STATIC_ASSERT (sizeof (GtkBitsetIter) >= sizeof (roaring_uint32_iterator_t));
|
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:
|
* gtk_bitset_iter_init_first:
|
||||||
* @iter: (out): a pointer to an uninitialized `GtkBitsetIter`
|
* @iter: (out): a pointer to an uninitialized `GtkBitsetIter`
|
||||||
|
@ -148,6 +148,9 @@ struct _GtkBitsetIter
|
|||||||
gpointer private_data[10];
|
gpointer private_data[10];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GDK_AVAILABLE_IN_4_6
|
||||||
|
GType gtk_bitset_iter_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_bitset_iter_init_first (GtkBitsetIter *iter,
|
gboolean gtk_bitset_iter_init_first (GtkBitsetIter *iter,
|
||||||
const GtkBitset *set,
|
const GtkBitset *set,
|
||||||
@ -171,8 +174,6 @@ GDK_AVAILABLE_IN_ALL
|
|||||||
guint gtk_bitset_iter_get_value (const GtkBitsetIter *iter);
|
guint gtk_bitset_iter_get_value (const GtkBitsetIter *iter);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_bitset_iter_is_valid (const GtkBitsetIter *iter);
|
gboolean gtk_bitset_iter_is_valid (const GtkBitsetIter *iter);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user