diff options
author | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-23 10:05:55 +0100 |
commit | 0f834b91a4768673833ab4917e87d86c237bb1a6 (patch) | |
tree | 363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/xquartz/xpr/x-hash.h | |
parent | fc72edebf875378459368c5383d9023730cbca54 (diff) | |
download | vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2 vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip |
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/xquartz/xpr/x-hash.h')
-rw-r--r-- | xorg-server/hw/xquartz/xpr/x-hash.h | 64 |
1 files changed, 30 insertions, 34 deletions
diff --git a/xorg-server/hw/xquartz/xpr/x-hash.h b/xorg-server/hw/xquartz/xpr/x-hash.h index f876b6b71..c4543346a 100644 --- a/xorg-server/hw/xquartz/xpr/x-hash.h +++ b/xorg-server/hw/xquartz/xpr/x-hash.h @@ -43,49 +43,45 @@ typedef void (x_hash_foreach_fun) (void *k, void *v, void *data); /* for X_PFX and X_EXTERN */ #include "x-list.h" -X_EXTERN x_hash_table *X_PFX (hash_table_new) (x_hash_fun *hash, - x_compare_fun *compare, - x_destroy_fun *key_destroy, - x_destroy_fun *value_destroy); -X_EXTERN void X_PFX (hash_table_free) (x_hash_table *h); - -X_EXTERN unsigned int X_PFX (hash_table_size) (x_hash_table *h); - -X_EXTERN void X_PFX (hash_table_insert) (x_hash_table *h, void *k, void *v); -X_EXTERN void X_PFX (hash_table_replace) (x_hash_table *h, void *k, void *v); -X_EXTERN void X_PFX (hash_table_remove) (x_hash_table *h, void *k); -X_EXTERN void *X_PFX (hash_table_lookup) (x_hash_table *h, - void *k, void **k_ret); -X_EXTERN void X_PFX (hash_table_foreach) (x_hash_table *h, - x_hash_foreach_fun *fun, - void *data); +X_EXTERN x_hash_table *X_PFX(hash_table_new) (x_hash_fun * hash, + x_compare_fun * compare, + x_destroy_fun * key_destroy, + x_destroy_fun * value_destroy); +X_EXTERN void X_PFX(hash_table_free) (x_hash_table * h); + +X_EXTERN unsigned int X_PFX(hash_table_size) (x_hash_table * h); + +X_EXTERN void X_PFX(hash_table_insert) (x_hash_table * h, void *k, void *v); +X_EXTERN void X_PFX(hash_table_replace) (x_hash_table * h, void *k, void *v); +X_EXTERN void X_PFX(hash_table_remove) (x_hash_table * h, void *k); +X_EXTERN void *X_PFX(hash_table_lookup) (x_hash_table * h, + void *k, void **k_ret); +X_EXTERN void X_PFX(hash_table_foreach) (x_hash_table * h, + x_hash_foreach_fun * fun, void *data); /* Conversion between unsigned int (e.g. xp_resource_id) and void pointer */ /* Forward declarations */ -static __inline__ void * -X_PFX (cvt_uint_to_vptr) (unsigned int val) __attribute__((always_inline)); +static __inline__ void *X_PFX(cvt_uint_to_vptr) (unsigned int val) + __attribute__ ((always_inline)); static __inline__ unsigned int -X_PFX (cvt_vptr_to_uint) (void * val) __attribute__((always_inline)); + X_PFX(cvt_vptr_to_uint) (void *val) __attribute__ ((always_inline)); /* Implementations */ -static __inline__ void * -X_PFX (cvt_uint_to_vptr) (unsigned int val) -{ - return (void*)((unsigned long)(val)); +static __inline__ void *X_PFX(cvt_uint_to_vptr) (unsigned int val) { + return (void *) ((unsigned long) (val)); } static __inline__ unsigned int -X_PFX (cvt_vptr_to_uint) (void * val) -{ - size_t sv = (size_t)val; - unsigned int uv = (unsigned int)sv; - - /* If this assert fails, chances are val actually is a pointer, - or there's been memory corruption */ - assert(sv == uv); - - return uv; + X_PFX(cvt_vptr_to_uint) (void *val) { + size_t sv = (size_t) val; + unsigned int uv = (unsigned int) sv; + + /* If this assert fails, chances are val actually is a pointer, + or there's been memory corruption */ + assert(sv == uv); + + return uv; } -#endif /* X_HASH_H */ +#endif /* X_HASH_H */ |