[at-spi2-core] Fix stupid 32 -> 64-bit casting problems with state sets



commit 4b0c78705e36cc59713a89f0f41f7137d05dac24
Author: Mike Gorse <mgorse novell com>
Date:   Mon Jan 10 15:57:49 2011 -0600

    Fix stupid 32 -> 64-bit casting problems with state sets

 atspi/atspi-stateset.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/atspi/atspi-stateset.c b/atspi/atspi-stateset.c
index e4adaa0..94d4b2e 100644
--- a/atspi/atspi-stateset.c
+++ b/atspi/atspi-stateset.c
@@ -111,9 +111,9 @@ atspi_state_set_set_by_name (AtspiStateSet *set, const gchar *name, gboolean ena
     if (!strcmp (state_names [i], name))
     {
       if (enabled)
-        set->states |= (1 << i);
+        set->states |= ((gint64)1 << i);
       else
-        set->states &= ~(1 << i);
+        set->states &= ~((gint64)1 << i);
       return;
     }
   }
@@ -200,7 +200,7 @@ atspi_state_set_contains (AtspiStateSet *set,
   if (!set)
     return FALSE;
   refresh_states (set);
-  return (set->states & (1 << state)) ? TRUE : FALSE;
+  return (set->states & ((gint64)1 << state)) ? TRUE : FALSE;
 }
 
 /**
@@ -291,6 +291,6 @@ void
 atspi_state_set_remove (AtspiStateSet *set, AtspiStateType state)
 {
   g_return_if_fail (set != NULL);
-  set->states &= ~(1 << state);
+  set->states &= ~((gint64)1 << state);
 }
 



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