aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/ephy-node.c31
2 files changed, 25 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 54ffd0088..2108d2140 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-07-03 Christian Persch <chpe@cvs.gnome.org>
+
+ * lib/ephy-node.c: (callback), (ephy_node_emit_signal):
+
+ Don't try to assign va_list to a gpointer var. Fixes bug #116131.
+
2003-07-02 Christian Persch <chpe@cvs.gnome.org>
* lib/widgets/ephy-zoom-control.c: (ephy_zoom_control_set_tooltip),
diff --git a/lib/ephy-node.c b/lib/ephy-node.c
index ed2b20e7b..b9bce2d33 100644
--- a/lib/ephy-node.c
+++ b/lib/ephy-node.c
@@ -64,6 +64,12 @@ struct EphyNode
EphyNodeDb *db;
};
+typedef struct
+{
+ EphyNodeSignalType type;
+ va_list valist;
+} ENESCData;
+
/* evillish hacks to temporarily readlock->writelock and v.v. */
static inline void
write_lock_to_read_lock (EphyNode *node)
@@ -113,14 +119,16 @@ int_hash (gconstpointer a)
}
static void
-callback (long id, EphyNodeSignalData *data, gpointer *user_data)
+callback (long id, EphyNodeSignalData *data, gpointer *dummy)
{
- va_list valist;
- EphyNodeSignalType type = GPOINTER_TO_INT (user_data[1]);
+ ENESCData *user_data;
+ va_list valist;
+
+ user_data = (ENESCData *) dummy;
- if (data->type != type) return;
+ valist = user_data->valist;
- va_copy(valist, user_data[0]);
+ if (data->type != user_data->type) return;
switch (data->type)
{
@@ -155,18 +163,17 @@ callback (long id, EphyNodeSignalData *data, gpointer *user_data)
static void
ephy_node_emit_signal (EphyNode *node, EphyNodeSignalType type, ...)
{
- va_list valist;
- gpointer data[2];
+ ENESCData data;
+
+ va_start (data.valist, type);
- va_start (valist, type);
+ data.type = type;
- data[0] = (gpointer)valist;
- data[1] = GINT_TO_POINTER (type);
g_hash_table_foreach (node->signals,
(GHFunc) callback,
- data);
+ &data);
- va_end (valist);
+ va_end (data.valist);
}
static void