[glib: 2/26] gdate: Deprecate GTime
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 2/26] gdate: Deprecate GTime
- Date: Mon, 29 Jul 2019 13:00:28 +0000 (UTC)
commit 5983cc874239b032f9d9404e52bace58c8ac6b8e
Author: Philip Withnall <withnall endlessm com>
Date: Fri Jun 14 12:19:38 2019 +0100
gdate: Deprecate GTime
It’s not Y2038-safe, as it’s 32-bit. While it was previously deprecated
in the documentation, now add the deprecation annotation for the
compiler.
Signed-off-by: Philip Withnall <withnall endlessm com>
Helps: #1438
glib/gdate.c | 2 ++
glib/gdate.h | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/glib/gdate.c b/glib/gdate.c
index 8fbb3b863..2b71622f6 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -1447,12 +1447,14 @@ g_date_set_time_t (GDate *date,
*
* Deprecated: 2.10: Use g_date_set_time_t() instead.
*/
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void
g_date_set_time (GDate *date,
GTime time_)
{
g_date_set_time_t (date, (time_t) time_);
}
+G_GNUC_END_IGNORE_DEPRECATIONS
/**
* g_date_set_time_val:
diff --git a/glib/gdate.h b/glib/gdate.h
index b7cd44e07..8f434ce44 100644
--- a/glib/gdate.h
+++ b/glib/gdate.h
@@ -45,7 +45,7 @@ G_BEGIN_DECLS
* Pennington <hp pobox com>
*/
-typedef gint32 GTime;
+typedef gint32 GTime GLIB_DEPRECATED_TYPE_IN_2_62_FOR(GDateTime);
typedef guint16 GDateYear;
typedef guint8 GDateDay; /* day of the month */
typedef struct _GDate GDate;
@@ -198,9 +198,11 @@ void g_date_set_time_t (GDate *date,
GLIB_AVAILABLE_IN_ALL
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_);
+G_GNUC_END_IGNORE_DEPRECATIONS
GLIB_AVAILABLE_IN_ALL
void g_date_set_month (GDate *date,
GDateMonth month);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]