[evolution] Bug 569110 - Crash on platform with 64-bit time_t / 32-bit long
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 569110 - Crash on platform with 64-bit time_t / 32-bit long
- Date: Mon, 18 Sep 2017 15:06:58 +0000 (UTC)
commit 2638638f7872cf6aff6a05485974dd0c860cff1d
Author: Matthias Drochner <M Drochner fz-juelich de>
Date: Mon Sep 18 17:07:07 2017 +0200
Bug 569110 - Crash on platform with 64-bit time_t / 32-bit long
src/calendar/gui/e-cal-model.c | 8 ++++----
src/calendar/gui/e-cal-model.h | 4 ++--
src/calendar/gui/e-day-view.c | 6 +++---
src/calendar/gui/e-week-view.c | 5 +++--
src/calendar/gui/ea-cal-view.c | 6 +++---
src/calendar/gui/ea-day-view-main-item.c | 6 +++---
src/calendar/gui/ea-week-view-main-item.c | 8 ++++----
src/e-util/e-marshal.list | 2 +-
8 files changed, 23 insertions(+), 22 deletions(-)
---
diff --git a/src/calendar/gui/e-cal-model.c b/src/calendar/gui/e-cal-model.c
index 6c1e872..696ad8d 100644
--- a/src/calendar/gui/e-cal-model.c
+++ b/src/calendar/gui/e-cal-model.c
@@ -2525,10 +2525,10 @@ e_cal_model_class_init (ECalModelClass *class)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ECalModelClass, time_range_changed),
NULL, NULL,
- e_marshal_VOID__LONG_LONG,
+ e_marshal_VOID__INT64_INT64,
G_TYPE_NONE, 2,
- G_TYPE_LONG,
- G_TYPE_LONG);
+ G_TYPE_INT64,
+ G_TYPE_INT64);
signals[ROW_APPENDED] = g_signal_new (
"row_appended",
@@ -3715,7 +3715,7 @@ e_cal_model_set_time_range (ECalModel *model,
priv->start = start;
priv->end = end;
- g_signal_emit (model, signals[TIME_RANGE_CHANGED], 0, start, end);
+ g_signal_emit (model, signals[TIME_RANGE_CHANGED], 0, (gint64) start, (gint64) end);
e_cal_data_model_unsubscribe (model->priv->data_model, subscriber);
e_cal_model_remove_all_objects (model);
diff --git a/src/calendar/gui/e-cal-model.h b/src/calendar/gui/e-cal-model.h
index 9282911..720e859 100644
--- a/src/calendar/gui/e-cal-model.h
+++ b/src/calendar/gui/e-cal-model.h
@@ -155,8 +155,8 @@ struct _ECalModelClass {
/* Signals */
void (*time_range_changed) (ECalModel *model,
- time_t start,
- time_t end);
+ gint64 start, /* time_t */
+ gint64 end); /* time_t */
void (*row_appended) (ECalModel *model);
void (*comps_deleted) (ECalModel *model,
gpointer list);
diff --git a/src/calendar/gui/e-day-view.c b/src/calendar/gui/e-day-view.c
index d3b5242..69fda99 100644
--- a/src/calendar/gui/e-day-view.c
+++ b/src/calendar/gui/e-day-view.c
@@ -2555,14 +2555,14 @@ e_day_view_precalc_visible_time_range (ECalendarView *cal_view,
static void
time_range_changed_cb (ECalModel *model,
- time_t start_time,
- time_t end_time,
+ gint64 i64_start_time,
+ gint64 i64_end_time,
gpointer user_data)
{
EDayView *day_view = E_DAY_VIEW (user_data);
EDayViewTimeItem *eti;
gint days_shown;
- time_t lower;
+ time_t lower, start_time = (time_t) i64_start_time, end_time = (time_t) i64_end_time;
g_return_if_fail (E_IS_DAY_VIEW (day_view));
diff --git a/src/calendar/gui/e-week-view.c b/src/calendar/gui/e-week-view.c
index eea60cd..a5ade40 100644
--- a/src/calendar/gui/e-week-view.c
+++ b/src/calendar/gui/e-week-view.c
@@ -445,10 +445,11 @@ e_week_view_precalc_visible_time_range (ECalendarView *cal_view,
static void
week_view_time_range_changed_cb (EWeekView *week_view,
- time_t start_time,
- time_t end_time,
+ gint64 i64_start_time,
+ gint64 i64_end_time,
ECalModel *model)
{
+ time_t start_time = (time_t) i64_start_time;
GDate date, base_date;
GDateWeekday weekday;
GDateWeekday display_start_day;
diff --git a/src/calendar/gui/ea-cal-view.c b/src/calendar/gui/ea-cal-view.c
index 5af10ba..69db29c 100644
--- a/src/calendar/gui/ea-cal-view.c
+++ b/src/calendar/gui/ea-cal-view.c
@@ -39,7 +39,7 @@ static void ea_cal_view_event_added_cb (ECalendarView *cal_view,
gpointer data);
static gboolean idle_dates_changed (gpointer data);
-static void ea_cal_model_time_range_changed_cb (ECalModel *model, time_t start, time_t end, gpointer data);
+static void ea_cal_model_time_range_changed_cb (ECalModel *model, gint64 i64_start, gint64 i64_end, gpointer
data);
static void atk_action_interface_init (AtkActionIface *iface);
static gboolean action_interface_do_action (AtkAction *action, gint i);
@@ -266,8 +266,8 @@ idle_dates_changed (gpointer data)
static void
ea_cal_model_time_range_changed_cb (ECalModel *model,
- time_t start,
- time_t end,
+ gint64 i64_start,
+ gint64 i64_end,
gpointer data)
{
g_idle_add (idle_dates_changed, data);
diff --git a/src/calendar/gui/ea-day-view-main-item.c b/src/calendar/gui/ea-day-view-main-item.c
index 00e8cd2..48a6347 100644
--- a/src/calendar/gui/ea-day-view-main-item.c
+++ b/src/calendar/gui/ea-day-view-main-item.c
@@ -44,7 +44,7 @@ static AtkObject * ea_day_view_main_item_get_parent (AtkObject *accessible);
static gint ea_day_view_main_item_get_index_in_parent (AtkObject *accessible);
/* callbacks */
-static void ea_day_view_main_item_time_range_changed_cb (ECalModel *model, time_t start, time_t end,
gpointer data);
+static void ea_day_view_main_item_time_range_changed_cb (ECalModel *model, gint64 i64_start, gint64 i64_end,
gpointer data);
static void ea_day_view_main_item_time_change_cb (EDayView *day_view, gpointer data);
/* component interface */
@@ -372,8 +372,8 @@ ea_day_view_main_item_get_index_in_parent (AtkObject *accessible)
static void
ea_day_view_main_item_time_range_changed_cb (ECalModel *model,
- time_t start,
- time_t end,
+ gint64 i64_start,
+ gint64 i64_end,
gpointer data)
{
EaDayViewMainItem *ea_main_item;
diff --git a/src/calendar/gui/ea-week-view-main-item.c b/src/calendar/gui/ea-week-view-main-item.c
index 7002b01..656ec02 100644
--- a/src/calendar/gui/ea-week-view-main-item.c
+++ b/src/calendar/gui/ea-week-view-main-item.c
@@ -50,8 +50,8 @@ static gint ea_week_view_main_item_get_index_in_parent
/* callbacks */
static void ea_week_view_main_item_time_range_changed_cb
(ECalModel *model,
- time_t start,
- time_t end,
+ gint64 i64_start,
+ gint64 i64_end,
gpointer data);
static void ea_week_view_main_item_time_change_cb
(EWeekView *week_view,
@@ -401,8 +401,8 @@ ea_week_view_main_item_get_index_in_parent (AtkObject *accessible)
static void
ea_week_view_main_item_time_range_changed_cb (ECalModel *model,
- time_t start,
- time_t end,
+ gint64 i64_start,
+ gint64 i64_end,
gpointer data)
{
EaWeekViewMainItem *ea_main_item;
diff --git a/src/e-util/e-marshal.list b/src/e-util/e-marshal.list
index 1ccafed..9b20cef 100644
--- a/src/e-util/e-marshal.list
+++ b/src/e-util/e-marshal.list
@@ -34,7 +34,7 @@ NONE:INT,POINTER,INT,OBJECT
NONE:INT,POINTER,INT,OBJECT,BOXED,UINT,UINT
NONE:INT,POINTER,INT,OBJECT,INT,INT,BOXED,UINT,UINT
NONE:INT,POINTER,INT,OBJECT,UINT
-NONE:LONG,LONG
+NONE:INT64,INT64
NONE:OBJECT,BOOLEAN
NONE:OBJECT,INT
NONE:OBJECT,DOUBLE,DOUBLE,BOOLEAN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]