mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-31 13:24:13 +02:00
Merge branch 'atomic-uintptr' into 'main'
gatomic: Use g(u)intptr where appropriate See merge request GNOME/glib!3143
This commit is contained in:
@@ -3375,7 +3375,7 @@ object_floating_flag_handler (GObject *object,
|
||||
oldvalue = g_atomic_pointer_get (&object->qdata);
|
||||
while (!g_atomic_pointer_compare_and_exchange_full (
|
||||
(void**) &object->qdata, oldvalue,
|
||||
(void *) ((gsize) oldvalue | OBJECT_FLOATING_FLAG),
|
||||
(void *) ((guintptr) oldvalue | OBJECT_FLOATING_FLAG),
|
||||
&oldvalue))
|
||||
;
|
||||
return (gsize) oldvalue & OBJECT_FLOATING_FLAG;
|
||||
@@ -3383,7 +3383,7 @@ object_floating_flag_handler (GObject *object,
|
||||
oldvalue = g_atomic_pointer_get (&object->qdata);
|
||||
while (!g_atomic_pointer_compare_and_exchange_full (
|
||||
(void**) &object->qdata, oldvalue,
|
||||
(void *) ((gsize) oldvalue & ~(gsize) OBJECT_FLOATING_FLAG),
|
||||
(void *) ((guintptr) oldvalue & ~(gsize) OBJECT_FLOATING_FLAG),
|
||||
&oldvalue))
|
||||
;
|
||||
return (gsize) oldvalue & OBJECT_FLOATING_FLAG;
|
||||
|
@@ -255,7 +255,7 @@ g_param_spec_unref (GParamSpec *pspec)
|
||||
void
|
||||
g_param_spec_sink (GParamSpec *pspec)
|
||||
{
|
||||
gsize oldvalue;
|
||||
guintptr oldvalue;
|
||||
g_return_if_fail (G_IS_PARAM_SPEC (pspec));
|
||||
|
||||
oldvalue = g_atomic_pointer_and (&pspec->qdata, ~(gsize)PARAM_FLOATING_FLAG);
|
||||
@@ -275,7 +275,7 @@ g_param_spec_sink (GParamSpec *pspec)
|
||||
GParamSpec*
|
||||
g_param_spec_ref_sink (GParamSpec *pspec)
|
||||
{
|
||||
gsize oldvalue;
|
||||
guintptr oldvalue;
|
||||
g_return_val_if_fail (G_IS_PARAM_SPEC (pspec), NULL);
|
||||
|
||||
oldvalue = g_atomic_pointer_and (&pspec->qdata, ~(gsize)PARAM_FLOATING_FLAG);
|
||||
|
Reference in New Issue
Block a user