From: Behdad Esfahbod Date: Mon, 2 Nov 2009 23:11:55 +0000 (-0500) Subject: Remove use of GINT16_FROM_BE X-Git-Tag: submit/master/20120920.151126~7^2~962 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9a204c7ab57ca0a866c72e1431c54a8883b15605;p=framework%2Fuifw%2Fharfbuzz.git Remove use of GINT16_FROM_BE --- diff --git a/src/hb-private.h b/src/hb-private.h index 8d885aa..933abea 100644 --- a/src/hb-private.h +++ b/src/hb-private.h @@ -46,10 +46,6 @@ #include "hb-common.h" -#define hb_be_uint8 -#define hb_be_int8 -#define hb_be_uint16(v) ((uint16_t) hb_be_int16 ((uint16_t) v)) -#define hb_be_uint32(v) ((uint32_t) hb_be_int32 ((uint32_t) v)) /* We need external help for these */ @@ -57,10 +53,6 @@ #include -/* Macros to convert to/from BigEndian */ -#define hb_be_int16(v) GINT16_FROM_BE (v) -#define hb_be_int32(v) GINT32_FROM_BE (v) - typedef int hb_atomic_int_t; #define hb_atomic_int_fetch_and_add(AI, V) g_atomic_int_exchange_and_add (&(AI), V) #define hb_atomic_int_get(AI) g_atomic_int_get (&(AI)) @@ -78,6 +70,8 @@ typedef GStaticMutex hb_mutex_t; #endif +#define hb_be_uint16(v) ((uint16_t) ((((const uint8_t *)&(v))[0] >> 8) + (((const uint8_t *)&(v))[1] << 8))) + #define hb_be_uint8_put_unaligned(v,V) (v[0] = (V), 0) #define hb_be_uint8_get_unaligned(v) (uint8_t) (v[0]) #define hb_be_uint8_cmp_unaligned(a,b) (a[0] == b[0])