[glib] g_atomic_int_get, g_atomic_pointer_get: accept const arguments



commit 690d6b97f83149770ef2aa4477c1cb28159678c2
Author: James Turner <james calminferno net>
Date:   Fri Apr 5 15:29:55 2013 -0400

    g_atomic_int_get, g_atomic_pointer_get: accept const arguments
    
    https://bugzilla.gnome.org/show_bug.cgi?id=697386

 glib/gatomic.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/glib/gatomic.c b/glib/gatomic.c
index 5cba767..eb2fe46 100644
--- a/glib/gatomic.c
+++ b/glib/gatomic.c
@@ -682,7 +682,7 @@ gsize
 static pthread_mutex_t g_atomic_lock = PTHREAD_MUTEX_INITIALIZER;
 
 gint
-(g_atomic_int_get) (volatile gint *atomic)
+(g_atomic_int_get) (const volatile gint *atomic)
 {
   gint value;
 
@@ -797,9 +797,9 @@ guint
 
 
 gpointer
-(g_atomic_pointer_get) (volatile void *atomic)
+(g_atomic_pointer_get) (const volatile void *atomic)
 {
-  volatile gpointer *ptr = atomic;
+  const volatile gpointer *ptr = atomic;
   gpointer value;
 
   pthread_mutex_lock (&g_atomic_lock);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]