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
This commit is contained in:
Jeremy Katz
2003-05-16 18:50:08 +00:00
committed by Jeremy Katz
parent c8de5a0059
commit 9c69964a52
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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;