[glibmm] 2.29.13



commit c07c4e9ddf5cc503d95ef7331b3f622a39f2fed9
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Sep 6 09:37:03 2011 +0200

    2.29.13

 ChangeLog            |    2 ++
 NEWS                 |   10 ++++++++++
 configure.ac         |    2 +-
 glib/src/variant.ccg |   27 ++++++++++++---------------
 4 files changed, 25 insertions(+), 16 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f35cfb0..7e764ae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+2.29.13:
+
 2011-09-06  Josà Alburquerque  <jaalburqu svn gnome org>
 
 	Variant< std::vector<std::string> >: Ensure correct creation.
diff --git a/NEWS b/NEWS
index 095f938..aca690d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,13 @@
+2.29.13:
+
+giomm:
+* Variant< std::vector<std::string> >: Ensure correct creation.
+  (Josà Alburquerque) Bug #657030 (Aurimas Äernius)
+gmmproc
+* Correct handling of constversion etc. in _WRAP_METHOD, avoiding side-effects 
+  on other _WRAP_METHOD() calls in the same .hg file.
+  (Kjell Ahlstedt) Bug #657751,
+	
 2.29.12:
 
 2011-08-03  Murray Cumming  <murrayc murrayc com>
diff --git a/configure.ac b/configure.ac
index ef115f4..e006e1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this library.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([glibmm], [2.29.12],
+AC_INIT([glibmm], [2.29.13],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=glibmm],
         [glibmm], [http://www.gtkmm.org/])
 AC_PREREQ([2.59])
diff --git a/glib/src/variant.ccg b/glib/src/variant.ccg
index 3c14cd9..c54b678 100644
--- a/glib/src/variant.ccg
+++ b/glib/src/variant.ccg
@@ -441,27 +441,24 @@ const VariantType& Variant<type_vec_string>::variant_type()
 Variant<type_vec_string>
 Variant<type_vec_string>::create(const type_vec_string& data)
 {
-  // Get the variant type of the elements.
-  const VariantType element_variant_type = Variant<std::string>::variant_type();
+  // Create a string array to add the strings of the vector to.
+  char** str_array = g_new(char*, data.size() + 1);
 
-  // Get the variant type of the array.
-  const VariantType array_variant_type = Variant<type_vec_string>::variant_type();
-  
-  // Create a GVariantBuilder to build the array.
-  GVariantBuilder* builder = g_variant_builder_new(array_variant_type.gobj());
-       
-  // Add the elements of the vector into the builder.
-  for(type_vec_string::const_iterator iter = data.begin();
-   iter < data.end(); iter++)
+  // Add the elements of the vector into the string array.
+  for(type_vec_string::size_type i = 0; i < data.size(); i++)
   {
-    g_variant_builder_add(builder,
-      element_variant_type.get_string().c_str(), iter->c_str());
+    str_array[i] = g_strdup(data[i].c_str());
   }
 
+  // Terminate the string array.
+  str_array[data.size()] = NULL;
+
   // Create the variant using the builder.
   Variant<type_vec_string> result =
-    Variant<type_vec_string>(g_variant_new(
-      array_variant_type.get_string().c_str(), builder));
+    Variant<type_vec_string>(g_variant_new_bytestring_array(str_array,
+      data.size()));
+
+  g_strfreev(str_array);
 
   // Remove the floating reference (since it is newly created).
   g_variant_ref_sink(result.gobj());



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