[glibmm] Glib::Shell: Use vector instead of Glib::ArrayHandle<>.



commit d9c9b2dbe4742388e621cf084908c212d7923fc4
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 17 10:34:32 2017 +0100

    Glib::Shell: Use vector instead of Glib::ArrayHandle<>.
    
    Using Glib::ArrayHandler<>::vector_to_array() and
    Glib::ArrayHandler<>::array_to_vector() instead, and only in the
    implementatoin instead of in the API.

 glib/src/shell.ccg |    4 ++--
 glib/src/shell.hg  |    3 +--
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/glib/src/shell.ccg b/glib/src/shell.ccg
index aaa3437..10b4b4f 100644
--- a/glib/src/shell.ccg
+++ b/glib/src/shell.ccg
@@ -22,7 +22,7 @@ namespace Glib
 
 /**** shell utility functions **********************************************/
 
-Glib::ArrayHandle<std::string>
+std::vector<std::string>
 shell_parse_argv(const std::string& command_line)
 {
   char** argv = nullptr;
@@ -34,7 +34,7 @@ shell_parse_argv(const std::string& command_line)
   if (error)
     Glib::Error::throw_exception(error);
 
-  return Glib::ArrayHandle<std::string>(argv, argc, Glib::OWNERSHIP_DEEP);
+  return Glib::ArrayHandler<std::string>::array_to_vector(argv, argc, Glib::OWNERSHIP_DEEP);
 }
 
 std::string
diff --git a/glib/src/shell.hg b/glib/src/shell.hg
index 5b2ec4b..b008993 100644
--- a/glib/src/shell.hg
+++ b/glib/src/shell.hg
@@ -17,7 +17,6 @@
 
 _DEFS(glibmm,glib)
 
-#include <glibmm/arrayhandle.h>
 #include <glibmm/error.h>
 #include <glib.h>
 #include <string>
@@ -47,7 +46,7 @@ _WRAP_GERROR(ShellError, GShellError, G_SHELL_ERROR, NO_GTYPE)
  * converted to any STL compatible container type).
  * @throw Glib::ShellError
  */
-Glib::ArrayHandle<std::string> shell_parse_argv(const std::string& command_line);
+std::vector<std::string> shell_parse_argv(const std::string& command_line);
 
 /** Quotes a string so that the shell (/bin/sh) will interpret the quoted
  * string to mean @a unquoted_string.  If you pass a filename to the shell,


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