[glib: 11/26] gdate: Deprecate methods which use GTimeVal
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 11/26] gdate: Deprecate methods which use GTimeVal
- Date: Mon, 29 Jul 2019 13:01:13 +0000 (UTC)
commit 45b74b02b8091d899e3fccacc590f78aa0542f63
Author: Philip Withnall <withnall endlessm com>
Date: Tue Jun 18 12:45:58 2019 +0100
gdate: Deprecate methods which use GTimeVal
GTimeVal is not year-2038-safe.
Signed-off-by: Philip Withnall <withnall endlessm com>
Helps: #1438
glib/gdate.c | 4 ++++
glib/gdate.h | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/glib/gdate.c b/glib/gdate.c
index 782c8160d..26b3f598e 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -1470,13 +1470,17 @@ G_GNUC_END_IGNORE_DEPRECATIONS
* The time to date conversion is done using the user's current timezone.
*
* Since: 2.10
+ * Deprecated: 2.62: #GTimeVal is not year-2038-safe. Use g_date_set_time_t()
+ * instead.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_date_set_time_val (GDate *date,
GTimeVal *timeval)
{
g_date_set_time_t (date, (time_t) timeval->tv_sec);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_date_set_month:
diff --git a/glib/gdate.h b/glib/gdate.h
index 8f434ce44..3bc07bf5c 100644
--- a/glib/gdate.h
+++ b/glib/gdate.h
@@ -195,10 +195,10 @@ void g_date_set_parse (GDate *date,
GLIB_AVAILABLE_IN_ALL
void g_date_set_time_t (GDate *date,
time_t timet);
-GLIB_AVAILABLE_IN_ALL
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+GLIB_DEPRECATED_IN_2_62_FOR(g_date_set_time_t)
void g_date_set_time_val (GDate *date,
GTimeVal *timeval);
-G_GNUC_BEGIN_IGNORE_DEPRECATIONS
GLIB_DEPRECATED_FOR(g_date_set_time_t)
void g_date_set_time (GDate *date,
GTime time_);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]