[gtkmm] Use std::time_t instead of ::time_t.



commit 4671f7577a6db59a60d3457f2de673dd765d06b8
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Thu Sep 13 17:09:13 2012 +0200

    Use std::time_t instead of ::time_t.
    
    * gtk/src/recentinfo.[hg|ccg]: Use std::time_t instead of ::time_t. Only
    std::time_t is required to be declared in <ctime>, which is recommended
    instead of <time.h> in C++ programs.
    * tools/m4/convert_gtk.m4: Add conversion from time_t to std::time_t.

 ChangeLog               |    9 +++++++++
 gtk/src/recentinfo.ccg  |    2 +-
 gtk/src/recentinfo.hg   |    8 ++++----
 tools/m4/convert_gtk.m4 |    1 +
 4 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e3bb4a9..1cf63d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2012-09-13  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
+	Use std::time_t instead of ::time_t.
+
+	* gtk/src/recentinfo.[hg|ccg]: Use std::time_t instead of ::time_t. Only
+	std::time_t is required to be declared in <ctime>, which is recommended
+	instead of <time.h> in C++ programs.
+	* tools/m4/convert_gtk.m4: Add conversion from time_t to std::time_t.
+
+2012-09-13  Kjell Ahlstedt  <kjell ahlstedt bredband net>
+
 	Use std::size_t and std::ptrdiff_t.
 
 	* demos/gtk-demo/example_stockbrowser.cc:
diff --git a/gtk/src/recentinfo.ccg b/gtk/src/recentinfo.ccg
index 8edf44a..08d6418 100644
--- a/gtk/src/recentinfo.ccg
+++ b/gtk/src/recentinfo.ccg
@@ -32,7 +32,7 @@ std::vector<Glib::ustring> RecentInfo::get_applications() const
 }
 
 bool RecentInfo::get_application_info(const Glib::ustring& app_name, std::string& app_exec,
-                                      guint& count, time_t& time_) const
+                                      guint& count, std::time_t& time_) const
 {
   const char* app_exec_cstr = 0;
   const int found = gtk_recent_info_get_application_info(
diff --git a/gtk/src/recentinfo.hg b/gtk/src/recentinfo.hg
index e797b1a..b7d0f21 100644
--- a/gtk/src/recentinfo.hg
+++ b/gtk/src/recentinfo.hg
@@ -53,9 +53,9 @@ public:
   _WRAP_METHOD(Glib::ustring get_description() const, gtk_recent_info_get_description)
   _WRAP_METHOD(Glib::ustring get_mime_type() const, gtk_recent_info_get_mime_type)
 
-  _WRAP_METHOD(time_t get_added() const, gtk_recent_info_get_added)
-  _WRAP_METHOD(time_t get_modified() const, gtk_recent_info_get_modified)
-  _WRAP_METHOD(time_t get_visited() const, gtk_recent_info_get_visited)
+  _WRAP_METHOD(std::time_t get_added() const, gtk_recent_info_get_added)
+  _WRAP_METHOD(std::time_t get_modified() const, gtk_recent_info_get_modified)
+  _WRAP_METHOD(std::time_t get_visited() const, gtk_recent_info_get_visited)
 
   _WRAP_METHOD(bool get_private_hint() const, gtk_recent_info_get_private_hint)
 
@@ -64,7 +64,7 @@ public:
 
   _WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_application_info)
   bool get_application_info(const Glib::ustring& app_name, std::string& app_exec,
-                            guint& count, time_t& time_) const;
+                            guint& count, std::time_t& time_) const;
 
   _WRAP_METHOD_DOCS_ONLY(gtk_recent_info_get_applications)
   std::vector<Glib::ustring> get_applications() const;
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index c5ece6f..522215a 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -57,6 +57,7 @@ _CONVERSION(`gpointer&',`gpointer*',`&($3)')
 _CONVERSION(`void*&',`gpointer*',`&($3)')
 
 _CONVERSION(`time_t&',`time_t*',`&($3)')
+_CONVERSION(`time_t',`std::time_t',`$3')
 
 _CONVERSION(`GError*&',`GError**',`&($3)')
 



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