Supports G_TYPE_LONG and G_TYPE_ULONG in ibus_message_iter_get
authorPeng Huang <shawn.p.huang@gmail.com>
Wed, 16 Sep 2009 08:09:45 +0000 (16:09 +0800)
committerPeng Huang <shawn.p.huang@gmail.com>
Wed, 16 Sep 2009 08:09:45 +0000 (16:09 +0800)
src/ibusmessage.c

index 0b2a9b3fd0e7e68286aa7277219e4577e6236470..efc05885da7ce386150dddbafae31bfc337afb3b 100644 (file)
@@ -769,6 +769,25 @@ ibus_message_iter_get (IBusMessageIter *iter,
             *(guint *) value = (guint) v;
             return TRUE;
         }
+    case G_TYPE_LONG:
+        {
+            dbus_int64_t v;
+            if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_INT32)
+                return FALSE;
+            dbus_message_iter_get_basic (iter, &v);
+            *(glong *) value = (glong) v;
+            return TRUE;
+        }
+    case G_TYPE_ULONG:
+        {
+            dbus_uint64_t v;
+            if (dbus_message_iter_get_arg_type (iter) != DBUS_TYPE_UINT32)
+                return FALSE;
+            dbus_message_iter_get_basic (iter, &v);
+            *(gulong *) value = (gulong) v;
+            return TRUE;
+        }
+
     case G_TYPE_BOOLEAN:
         {
             dbus_bool_t v;