]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Move dbus_use_ptr_array to DBusClientModule
authorJürg Billeter <j@bitron.ch>
Mon, 3 Nov 2008 21:44:16 +0000 (21:44 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Mon, 3 Nov 2008 21:44:16 +0000 (21:44 +0000)
2008-11-03  Jürg Billeter  <j@bitron.ch>

* gobject/valaccodebasemodule.vala:
* gobject/valadbusclientmodule.vala:

Move dbus_use_ptr_array to DBusClientModule

svn path=/trunk/; revision=1970

ChangeLog
gobject/valaccodebasemodule.vala
gobject/valadbusclientmodule.vala

index 720426eca4848652a34c1d6faa78c531e3a228d2..dd2fcd5ca925ceed879ffcdba8d8cae5dfb9fd56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-03  Jürg Billeter  <j@bitron.ch>
+
+       * gobject/valaccodebasemodule.vala:
+       * gobject/valadbusclientmodule.vala:
+
+       Move dbus_use_ptr_array to DBusClientModule
+
 2008-11-03  Jürg Billeter  <j@bitron.ch>
 
        * gobject/Makefile.am:
index 7b4c75b1b7ade986da4bb9a6dee11229fee1abe1..d0c007b06b8faba74acf05f4f20f52fa351823f6 100644 (file)
@@ -4193,32 +4193,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
                }
        }
 
-       public bool dbus_use_ptr_array (ArrayType array_type) {
-               if (array_type.element_type.data_type == string_type.data_type) {
-                       // use char**
-                       return false;
-               } else if (array_type.element_type.data_type == bool_type.data_type
-                          || array_type.element_type.data_type == char_type.data_type
-                          || array_type.element_type.data_type == uchar_type.data_type
-                          || array_type.element_type.data_type == int_type.data_type
-                          || array_type.element_type.data_type == uint_type.data_type
-                          || array_type.element_type.data_type == long_type.data_type
-                          || array_type.element_type.data_type == ulong_type.data_type
-                          || array_type.element_type.data_type == int8_type.data_type
-                          || array_type.element_type.data_type == uint8_type.data_type
-                          || array_type.element_type.data_type == int32_type.data_type
-                          || array_type.element_type.data_type == uint32_type.data_type
-                          || array_type.element_type.data_type == int64_type.data_type
-                          || array_type.element_type.data_type == uint64_type.data_type
-                          || array_type.element_type.data_type == double_type.data_type) {
-                       // use GArray
-                       return false;
-               } else {
-                       // use GPtrArray
-                       return true;
-               }
-       }
-
        public CCodeNode? get_ccodenode (CodeNode node) {
                if (node.ccodenode == null) {
                        node.accept (codegen);
index 03b87d74787a9e9679f0459af7ac59c78b9c7875..ae9415df2aac06893f573495573e7eff56af7d30 100644 (file)
@@ -476,4 +476,30 @@ public class Vala.DBusClientModule : GAsyncModule {
                        return new CCodeIdentifier (data_type.data_type.get_type_id ());
                }
        }
+
+       public bool dbus_use_ptr_array (ArrayType array_type) {
+               if (array_type.element_type.data_type == string_type.data_type) {
+                       // use char**
+                       return false;
+               } else if (array_type.element_type.data_type == bool_type.data_type
+                          || array_type.element_type.data_type == char_type.data_type
+                          || array_type.element_type.data_type == uchar_type.data_type
+                          || array_type.element_type.data_type == int_type.data_type
+                          || array_type.element_type.data_type == uint_type.data_type
+                          || array_type.element_type.data_type == long_type.data_type
+                          || array_type.element_type.data_type == ulong_type.data_type
+                          || array_type.element_type.data_type == int8_type.data_type
+                          || array_type.element_type.data_type == uint8_type.data_type
+                          || array_type.element_type.data_type == int32_type.data_type
+                          || array_type.element_type.data_type == uint32_type.data_type
+                          || array_type.element_type.data_type == int64_type.data_type
+                          || array_type.element_type.data_type == uint64_type.data_type
+                          || array_type.element_type.data_type == double_type.data_type) {
+                       // use GArray
+                       return false;
+               } else {
+                       // use GPtrArray
+                       return true;
+               }
+       }
 }