aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ephy-node.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-07-03 06:12:33 +0800
committerChristian Persch <chpe@src.gnome.org>2003-07-03 06:12:33 +0800
commit76e761ad2019ffa8f86d41afc848f271bea4d1e0 (patch)
treecf26f8c43a87f7f0802975c009fef228fd9d5732 /lib/ephy-node.c
parent6650d3ac5caa4cdad7d5a555fb47e19113b90b02 (diff)
downloadgsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.tar
gsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.tar.gz
gsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.tar.bz2
gsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.tar.lz
gsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.tar.xz
gsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.tar.zst
gsoc2013-epiphany-76e761ad2019ffa8f86d41afc848f271bea4d1e0.zip
Don't try to assign va_list to a gpointer var. Fixes bug #116131.
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.
Diffstat (limited to 'lib/ephy-node.c')
-rw-r--r--lib/ephy-node.c31
1 files changed, 19 insertions, 12 deletions
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