Correct documentation of g_atomic_pointer_exchange

The references to gint and guint were copy/pasted from
g_atomic_int_exchange(), but what we want here is a gpointer, gintptr
or guintptr like the rest of the g_atomic_pointer_ family.

Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2022-06-23 09:15:43 +01:00
parent cb0cc996ee
commit 69f7b03c38

View File

@ -432,7 +432,7 @@ gboolean
/** /**
* g_atomic_pointer_exchange: * g_atomic_pointer_exchange:
* @atomic: a pointer to a #gint or #guint * @atomic: a pointer to a #gpointer-sized value
* @newval: the value to replace with * @newval: the value to replace with
* *
* Sets the @atomic to @newval and returns the old value from @atomic. * Sets the @atomic to @newval and returns the old value from @atomic.
@ -444,7 +444,7 @@ gboolean
* *
* This call acts as a full compiler and hardware memory barrier. * This call acts as a full compiler and hardware memory barrier.
* *
* Returns: the value of @atomic before the exchange, signed * Returns: the value of @atomic before the exchange
* *
* Since: 2.74 * Since: 2.74
**/ **/