Mercurial > hg > xemacs-beta
comparison src/gccache-gtk.c @ 2054:91d4c8c65a0f
[xemacs-hg @ 2004-05-02 04:06:51 by malcolmp]
Fix warnings and errors when building GTK using C++ and --use-union-type.
author | malcolmp |
---|---|
date | Sun, 02 May 2004 04:07:01 +0000 |
parents | a8d8f419b459 |
children | 3d8143fc88e1 |
comparison
equal
deleted
inserted
replaced
2053:11e709117623 | 2054:91d4c8c65a0f |
---|---|
66 #include "hash.h" | 66 #include "hash.h" |
67 #endif | 67 #endif |
68 | 68 |
69 struct gcv_and_mask { | 69 struct gcv_and_mask { |
70 GdkGCValues gcv; | 70 GdkGCValues gcv; |
71 GdkGCValuesMask mask; | 71 unsigned long mask; /* contains a GdkGCValuesMask bitmask. */ |
72 }; | 72 }; |
73 | 73 |
74 struct gc_cache_cell { | 74 struct gc_cache_cell { |
75 GdkGC *gc; | 75 GdkGC *gc; |
76 struct gcv_and_mask gcvm; | 76 struct gcv_and_mask gcvm; |
153 #endif | 153 #endif |
154 xfree (cache, struct gc_cache *); | 154 xfree (cache, struct gc_cache *); |
155 } | 155 } |
156 | 156 |
157 GdkGC * | 157 GdkGC * |
158 gc_cache_lookup (struct gc_cache *cache, GdkGCValues *gcv, GdkGCValuesMask mask) | 158 gc_cache_lookup (struct gc_cache *cache, GdkGCValues *gcv, unsigned long mask) |
159 { | 159 { |
160 struct gc_cache_cell *cell, *next, *prev; | 160 struct gc_cache_cell *cell, *next, *prev; |
161 struct gcv_and_mask gcvm; | 161 struct gcv_and_mask gcvm; |
162 | 162 |
163 if ((!!cache->head) != (!!cache->tail)) abort (); | 163 if ((!!cache->head) != (!!cache->tail)) abort (); |
265 /* Hash it in the table */ | 265 /* Hash it in the table */ |
266 puthash (&cell->gcvm, cell, cache->table); | 266 puthash (&cell->gcvm, cell, cache->table); |
267 #endif | 267 #endif |
268 | 268 |
269 /* Now make and return the GC. */ | 269 /* Now make and return the GC. */ |
270 cell->gc = gdk_gc_new_with_values (cache->window, gcv, mask); | 270 cell->gc = gdk_gc_new_with_values (cache->window, gcv, (GdkGCValuesMask) mask); |
271 | 271 |
272 /* debug */ | 272 /* debug */ |
273 assert (cell->gc == gc_cache_lookup (cache, gcv, mask)); | 273 assert (cell->gc == gc_cache_lookup (cache, gcv, mask)); |
274 | 274 |
275 return cell->gc; | 275 return cell->gc; |