mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-26 15:36:14 +01:00
gdate: Deprecate methods which use GTimeVal
GTimeVal is not year-2038-safe. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #1438
This commit is contained in:
parent
ec0cc39de0
commit
45b74b02b8
@ -1470,13 +1470,17 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
|||||||
* The time to date conversion is done using the user's current timezone.
|
* The time to date conversion is done using the user's current timezone.
|
||||||
*
|
*
|
||||||
* Since: 2.10
|
* 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
|
void
|
||||||
g_date_set_time_val (GDate *date,
|
g_date_set_time_val (GDate *date,
|
||||||
GTimeVal *timeval)
|
GTimeVal *timeval)
|
||||||
{
|
{
|
||||||
g_date_set_time_t (date, (time_t) timeval->tv_sec);
|
g_date_set_time_t (date, (time_t) timeval->tv_sec);
|
||||||
}
|
}
|
||||||
|
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* g_date_set_month:
|
* g_date_set_month:
|
||||||
|
@ -195,10 +195,10 @@ void g_date_set_parse (GDate *date,
|
|||||||
GLIB_AVAILABLE_IN_ALL
|
GLIB_AVAILABLE_IN_ALL
|
||||||
void g_date_set_time_t (GDate *date,
|
void g_date_set_time_t (GDate *date,
|
||||||
time_t timet);
|
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,
|
void g_date_set_time_val (GDate *date,
|
||||||
GTimeVal *timeval);
|
GTimeVal *timeval);
|
||||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
|
||||||
GLIB_DEPRECATED_FOR(g_date_set_time_t)
|
GLIB_DEPRECATED_FOR(g_date_set_time_t)
|
||||||
void g_date_set_time (GDate *date,
|
void g_date_set_time (GDate *date,
|
||||||
GTime time_);
|
GTime time_);
|
||||||
|
Loading…
Reference in New Issue
Block a user