[gnumeric] Compilation: fix potential 64-bit problem.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Compilation: fix potential 64-bit problem.
- Date: Fri, 17 Jul 2020 01:20:20 +0000 (UTC)
commit 1180fd9291eaf81c43831a3c818501390b810c3e
Author: Morten Welinder <terra gnome org>
Date: Thu Jul 16 21:19:30 2020 -0400
Compilation: fix potential 64-bit problem.
Signal numbers are gulong.
ChangeLog | 6 ++++++
NEWS | 1 +
src/gui-util.c | 18 +++++++++---------
3 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e5ca0f87d..c923c94b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-07-16 Morten Welinder <terra gnome org>
+
+ * src/gui-util.c (gnm_dialog_setup_destroy_handlers): Fix
+ potential 64-bit problem.
+ (cb_gnm_dialog_setup_destroy_handlers): Ditto.
+
2020-07-12 Morten Welinder <terra gnome org>
* src/sstest.c (test_recalc): New test for dependency tracking.
diff --git a/NEWS b/NEWS
index 6e98d62ee..ba4e8eafd 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,7 @@ Morten:
* Avoid style dependency redraw during file load.
* Tend to dead kittens.
* Fix metadata dialog. [#510]
+ * Fix potential 64-bit problem with signals.
--------------------------------------------------------------------------
Gnumeric 1.12.47
diff --git a/src/gui-util.c b/src/gui-util.c
index e403b49cd..c00b15d22 100644
--- a/src/gui-util.c
+++ b/src/gui-util.c
@@ -1129,7 +1129,7 @@ cb_gnm_dialog_setup_destroy_handlers (G_GNUC_UNUSED GtkWidget *widget,
for (i = 0; i < (int)os->len; i += 2) {
GObject *obj = g_ptr_array_index (os, i);
- guint s = GPOINTER_TO_UINT (g_ptr_array_index (os, i + 1));
+ gulong s = GPOINTER_TO_SIZE (g_ptr_array_index (os, i + 1));
g_signal_handler_disconnect (obj, s);
}
@@ -1156,33 +1156,33 @@ gnm_dialog_setup_destroy_handlers (GtkDialog *dialog,
what |= GNM_DIALOG_DESTROY_SHEET_REMOVED;
if (what & GNM_DIALOG_DESTROY_SHEET_REMOVED) {
- guint s = g_signal_connect_swapped
+ gulong s = g_signal_connect_swapped
(G_OBJECT (wb),
"sheet_deleted",
G_CALLBACK (gtk_widget_destroy),
dialog);
g_ptr_array_add (os, wb);
- g_ptr_array_add (os, GUINT_TO_POINTER (s));
+ g_ptr_array_add (os, GSIZE_TO_POINTER (s));
}
if (what & GNM_DIALOG_DESTROY_SHEET_ADDED) {
- guint s = g_signal_connect_swapped
+ gulong s = g_signal_connect_swapped
(G_OBJECT (wb),
"sheet_added",
G_CALLBACK (gtk_widget_destroy),
dialog);
g_ptr_array_add (os, wb);
- g_ptr_array_add (os, GUINT_TO_POINTER (s));
+ g_ptr_array_add (os, GSIZE_TO_POINTER (s));
}
if (what & GNM_DIALOG_DESTROY_SHEETS_REORDERED) {
- guint s = g_signal_connect_swapped
+ gulong s = g_signal_connect_swapped
(G_OBJECT (wb),
"sheet_order_changed",
G_CALLBACK (gtk_widget_destroy),
dialog);
g_ptr_array_add (os, wb);
- g_ptr_array_add (os, GUINT_TO_POINTER (s));
+ g_ptr_array_add (os, GSIZE_TO_POINTER (s));
}
for (i = 0; i < N; i++) {
@@ -1191,13 +1191,13 @@ gnm_dialog_setup_destroy_handlers (GtkDialog *dialog,
if ((what & GNM_DIALOG_DESTROY_SHEET_RENAMED) ||
(current && (what & GNM_DIALOG_DESTROY_CURRENT_SHEET_RENAMED))) {
- guint s = g_signal_connect_swapped
+ gulong s = g_signal_connect_swapped
(G_OBJECT (this_sheet),
"notify::name",
G_CALLBACK (gtk_widget_destroy),
dialog);
g_ptr_array_add (os, this_sheet);
- g_ptr_array_add (os, GUINT_TO_POINTER (s));
+ g_ptr_array_add (os, GSIZE_TO_POINTER (s));
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]