Commit 04059387 authored by Claudio Saavedra's avatar Claudio Saavedra Committed by Patrick Griffis

SoupDate: deprecate soup_date_to_timeval()

GTimeVal has been deprecated and shouldn't be used, so deprecate
soup_date_to_timeval().
parent b9d34b0e
Pipeline #144212 passed with stage
in 1 minute and 3 seconds
......@@ -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:
......
......@@ -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_70
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);
......
......@@ -68,6 +68,7 @@ G_BEGIN_DECLS
#define SOUP_VERSION_2_62 (G_ENCODE_VERSION (2, 62))
#define SOUP_VERSION_2_66 (G_ENCODE_VERSION (2, 66))
#define SOUP_VERSION_2_68 (G_ENCODE_VERSION (2, 68))
#define SOUP_VERSION_2_70 (G_ENCODE_VERSION (2, 70))
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
......@@ -396,6 +397,12 @@ G_BEGIN_DECLS
# define SOUP_AVAILABLE_IN_2_68 _SOUP_EXTERN
#endif
#if SOUP_VERSION_MIN_REQUIRED >= SOUP_VERSION_2_70
# define SOUP_DEPRECATED_IN_2_70 G_DEPRECATED
#else
# define SOUP_DEPRECATED_IN_2_70
#endif
SOUP_AVAILABLE_IN_2_42
guint soup_get_major_version (void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment