[glibmm] ApplicationCommandLine: Use std::string instead of ustring in some API.



commit 22d4e2370000a7739cc990bac15106ee82592a2c
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 4 09:32:59 2011 +0100

    ApplicationCommandLine: Use std::string instead of ustring in some API.
    
    * gio/src/applicationcommandline.hg: The C documentation says that some
    return strings could be non-UTF-8.

 ChangeLog                         |    7 +++++++
 gio/src/applicationcommandline.hg |   12 +++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 62aab10..af0d857 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-04  Murray Cumming  <murrayc murrayc com>
+
+	ApplicationCommandLine: Use std::string instead of ustring in some API.
+
+	* gio/src/applicationcommandline.hg: The C documentation says that some 
+	return strings could be non-UTF-8.
+
 2011-02-28  Murray Cumming  <murrayc murrayc com>
 
 	Application: Wrap the local_command_line vfunc, though it is not finished. 
diff --git a/gio/src/applicationcommandline.hg b/gio/src/applicationcommandline.hg
index 8d67ab5..02e02a0 100644
--- a/gio/src/applicationcommandline.hg
+++ b/gio/src/applicationcommandline.hg
@@ -34,10 +34,16 @@ protected:
 public:
 
   _WRAP_METHOD(char** get_arguments(int& argc) const, g_application_command_line_get_arguments)
-  _WRAP_METHOD(Glib::ustring get_cwd() const, g_application_command_line_get_cwd)
+  
+  //We use std::string instead of ustring because the C documentation says that it may be non-UTF-8 data:
+  _WRAP_METHOD(std::string get_cwd() const, g_application_command_line_get_cwd)
+
   // it seems that h2defs.py has trouble parsing the const gchar * const * type
-  //_WRAP_METHOD(std::vector<Glib::ustring> get_environ() const, g_application_command_line_get_environ)
-  _WRAP_METHOD(Glib::ustring getenv(const Glib::ustring& name) const, g_application_command_line_getenv)
+  //_WRAP_METHOD(std::vector<std::string> get_environ() const, g_application_command_line_get_environ)
+  
+  //We use std::string instead of ustring because the C documentation says that it may be non-UTF-8 data:
+  _WRAP_METHOD(std::string getenv(const Glib::ustring& name) const, g_application_command_line_getenv)
+  
   _WRAP_METHOD(bool is_remote() const, g_application_command_line_get_is_remote)
   //GVariant *               g_application_command_line_get_platform_data
   _WRAP_METHOD(void set_exit_status(int exit_status), g_application_command_line_set_exit_status)



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