[glibmm] Remove default conversion to StringArrayHandle



commit ab8bbe35087e133d2c347612b6b18943675fd06e
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Jun 6 13:49:07 2010 +0200

    Remove default conversion to StringArrayHandle
    
    * tools/m4/convert_gio.m4: Remove a default conversion from char** to
    StringArrayHandle, because there can be no good default, because each use
    can have different ownership, so it risks hiding an error.
    * gio/src/drive.hg:
    * gio/src/fileinfo.hg:
    * gio/src/filenamecompleter.hg:
    * gio/src/volume.hg: Add a local #m4 conversion instead.
    One day we will have the new introspection information (with the ownership)
    available to gmmproc so we don't need to do this.

 ChangeLog                    |   27 +++++++++++++++++++++++++++
 gio/src/drive.hg             |    2 ++
 gio/src/fileinfo.hg          |    3 +++
 gio/src/filenamecompleter.hg |    2 ++
 gio/src/volume.hg            |    1 +
 tools/m4/convert_gio.m4      |    1 -
 6 files changed, 35 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5841344..fcabb4e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2010-06-06  Murray Cumming  <murrayc murrayc com>
+
+	Settings: Fix the build with the latest glib from git master.
+
+	* gio/src/gio_methods.defs: Remove extra length parameters, removed from the 
+	C API. This is a generated file, but this change is simple.
+	* gio/src/settings.[hg|ccg]: get_string_array(), set_string_array(): 
+	Remove the length parameter, and just use _WRAP_METHOD() now that it is simple 
+	enough for that.
+	* tools/m4/convert_gio.m4: Add a necessary conversion.
+	* glib/src/glib_functions.defs: Remove some bad unused definitions that 
+	were causing annoying warnings.
+
+2010-06-06  Murray Cumming  <murrayc murrayc com>
+
+	Remove default conversion to StringArrayHandle
+
+	* tools/m4/convert_gio.m4: Remove a default conversion from char** to 
+	StringArrayHandle, because there can be no good default, because each use 
+	can have different ownership, so it risks hiding an error.
+	* gio/src/drive.hg:
+	* gio/src/fileinfo.hg:
+	* gio/src/filenamecompleter.hg:
+	* gio/src/volume.hg: Add a local #m4 conversion instead.
+	One day we will have the new introspection information (with the ownership) 
+	available to gmmproc so we don't need to do this.
+	
 2010-06-04  Chris Kühl  <blixtra gmail com>
 
 	Removal of length parameter for g_settings_[gs]et_strv
diff --git a/gio/src/drive.hg b/gio/src/drive.hg
index ddfe803..872dd4d 100644
--- a/gio/src/drive.hg
+++ b/gio/src/drive.hg
@@ -123,6 +123,8 @@ public:
                errthrow)
 
   _WRAP_METHOD(std::string get_identifier(const std::string& kind) const, g_drive_get_identifier)
+  
+  #m4 _CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(Glib::StringArrayHandle enumerate_identifiers() const, g_drive_enumerate_identifiers)
 
   /** @newin{2,22} */
diff --git a/gio/src/fileinfo.hg b/gio/src/fileinfo.hg
index c472ce2..5a722c0 100644
--- a/gio/src/fileinfo.hg
+++ b/gio/src/fileinfo.hg
@@ -90,8 +90,11 @@ public:
                g_file_info_copy_into)
   _WRAP_METHOD(bool has_attribute(const std::string& attribute) const,
                g_file_info_has_attribute)
+               
+  #m4 _CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(Glib::StringArrayHandle list_attributes(const std::string& name_space) const,
                g_file_info_list_attributes)
+               
   _WRAP_METHOD(FileAttributeType get_attribute_type(const std::string& attribute) const,
                g_file_info_get_attribute_type)
   _WRAP_METHOD(void remove_attribute(const std::string& attribute),
diff --git a/gio/src/filenamecompleter.hg b/gio/src/filenamecompleter.hg
index fd949b6..7b7e5a2 100644
--- a/gio/src/filenamecompleter.hg
+++ b/gio/src/filenamecompleter.hg
@@ -44,6 +44,8 @@ public:
   _WRAP_CREATE()
 
   _WRAP_METHOD(std::string get_completion_suffix(const std::string& initial_text) const, g_filename_completer_get_completion_suffix)
+  
+  #m4 _CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(Glib::StringArrayHandle get_completions(const std::string& initial_text) const, g_filename_completer_get_completions)
   _WRAP_METHOD(void set_dirs_only(bool dirs_only = true), g_filename_completer_set_dirs_only)
 
diff --git a/gio/src/volume.hg b/gio/src/volume.hg
index 2f9cfb1..615250c 100644
--- a/gio/src/volume.hg
+++ b/gio/src/volume.hg
@@ -135,6 +135,7 @@ public:
   _WRAP_METHOD(std::string get_identifier(const std::string& kind) const,
                g_volume_get_identifier)
 
+  #m4 _CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3, Glib::OWNERSHIP_DEEP)')
   _WRAP_METHOD(Glib::StringArrayHandle enumerate_identifiers() const,
                g_volume_enumerate_identifiers)
 
diff --git a/tools/m4/convert_gio.m4 b/tools/m4/convert_gio.m4
index feb2032..c8a600c 100644
--- a/tools/m4/convert_gio.m4
+++ b/tools/m4/convert_gio.m4
@@ -74,7 +74,6 @@ _CONVERSION(`GFileEnumerator*',`Glib::RefPtr<FileEnumerator>',`Glib::wrap($3)')
 _CONVERSION(`GFileInfo*',`Glib::RefPtr<FileInfo>',`Glib::wrap($3)')
 _CONVERSION(`Glib::RefPtr<FileInfo>&',`GFileInfo*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`const Glib::RefPtr<FileInfo>&',`GFileInfo*',__CONVERT_REFPTR_TO_P)
-_CONVERSION(`char**',`Glib::StringArrayHandle',`Glib::StringArrayHandle($3)')
 _CONVERSION(`Glib::TimeVal&', `GTimeVal*', static_cast<$2>(&$3))
 _CONVERSION(`const Glib::TimeVal&', `GTimeVal*', const_cast<GTimeVal*>(static_cast<const GTimeVal*>(&$3)))
 _CONVERSION(`const Glib::RefPtr<FileAttributeMatcher>&',`GFileAttributeMatcher*',__CONVERT_CONST_REFPTR_TO_P)



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