aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-05-17 02:50:08 +0800
committerJeremy Katz <katzj@src.gnome.org>2003-05-17 02:50:08 +0800
commit9c69964a524cf84e29f22e2394145028d70d06a2 (patch)
treedd2e57a12214d329e1dffd8024c7e9472cca40fc
parentc8de5a00598fe7c49a76eb949aceeb7b05389978 (diff)
downloadgsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.tar
gsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.tar.gz
gsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.tar.bz2
gsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.tar.lz
gsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.tar.xz
gsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.tar.zst
gsoc2013-evolution-9c69964a524cf84e29f22e2394145028d70d06a2.zip
Use glib macros for pointer/int conversion.
2003-05-16 Jeremy Katz <katzj@redhat.com> * e-sexp.c (term_eval_and): Use glib macros for pointer/int conversion. svn path=/trunk/; revision=21221
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-sexp.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 639cfdba29..a7cff29c1b 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2003-05-16 Jeremy Katz <katzj@redhat.com>
+
+ * e-sexp.c (term_eval_and): Use glib macros for pointer/int
+ conversion.
+
2003-05-07 Rodrigo Moya <rodrigo@ximian.com>
Fixes crash in #42212
diff --git a/e-util/e-sexp.c b/e-util/e-sexp.c
index 90c920661d..a7619c59f2 100644
--- a/e-util/e-sexp.c
+++ b/e-util/e-sexp.c
@@ -267,9 +267,11 @@ term_eval_and(struct _ESExp *f, int argc, struct _ESExpTerm **argv, void *data)
a1 = (char **)r1->value.ptrarray->pdata;
l1 = r1->value.ptrarray->len;
for (j=0;j<l1;j++) {
+ gpointer ptr;
int n;
- n = (int)g_hash_table_lookup(ht, a1[j]);
- g_hash_table_insert(ht, a1[j], (void *)n+1);
+ ptr = g_hash_table_lookup(ht, a1[j]);
+ n = GPOINTER_TO_INT(ptr);
+ g_hash_table_insert(ht, a1[j], GINT_TO_POINTER(n+1));
}
} else if (r1->type == ESEXP_RES_BOOL) {
bool = bool && r1->value.bool;