SoupDate: deprecate soup_date_to_timeval() 83/223883/1 accepted/tizen/unified/20200224.081355 submit/tizen/20200203.160801 submit/tizen/20200217.011016
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 4 Feb 2020 12:44:03 +0000 (21:44 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 4 Feb 2020 12:45:18 +0000 (21:45 +0900)
GTimeVal has been deprecated and shouldn't be used, so deprecate
soup_date_to_timeval().

https://gitlab.gnome.org/GNOME/libsoup/commit/040593875e0193935a1141bdf21388abb4b5087b#

[libsoup/soup-date.h]
SOUP_DEPRECATED_IN_2_62 at line 65 should be SOUP_DEPRECATED_IN_2_70 according to upstream patch.
It will be fixed if libsoup is updated to 2.70.

Change-Id: I821d89000c6c796abf0469659f343530ec0e1496

libsoup/soup-date.c
libsoup/soup-date.h

index 98aa95f..824ddc1 100644 (file)
@@ -722,6 +722,7 @@ soup_date_to_time_t (SoupDate *date)
        return (time_t) (sizeof (time_t) == 4 ? MIN(seconds, G_MAXINT32) : seconds);
 }
 
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 /**
  * soup_date_to_timeval:
  * @date: a #SoupDate
@@ -729,6 +730,8 @@ soup_date_to_time_t (SoupDate *date)
  *
  * Converts @date to a #GTimeVal.
  *
+ * Deprecated: Do not use #GTimeVal, as it's not Y2038-safe.
+ *
  * Since: 2.24
  */
 void
@@ -743,6 +746,7 @@ soup_date_to_timeval (SoupDate *date, GTimeVal *time)
        time->tv_sec = ((((time->tv_sec * 24) + date->hour) * 60) + date->minute) * 60 + date->second;
        time->tv_usec = 0;
 }
+G_GNUC_END_IGNORE_DEPRECATIONS
 
 /**
  * soup_date_is_past:
index d15c907..45cfd41 100644 (file)
@@ -59,11 +59,14 @@ char     *soup_date_to_string       (SoupDate       *date,
 SOUP_AVAILABLE_IN_2_24
 time_t    soup_date_to_time_t       (SoupDate       *date);
 
+#ifndef SOUP_DISABLE_DEPRECATED
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 SOUP_AVAILABLE_IN_2_24
+SOUP_DEPRECATED_IN_2_62
 void      soup_date_to_timeval      (SoupDate       *date,
                                     GTimeVal       *time);
 G_GNUC_END_IGNORE_DEPRECATIONS
+#endif
 
 SOUP_AVAILABLE_IN_2_24
 gboolean  soup_date_is_past         (SoupDate       *date);