Remove use of GINT16_FROM_BE

This commit is contained in:
Behdad Esfahbod 2009-11-02 18:11:55 -05:00
parent 1f0ceeb8cf
commit 9a204c7ab5
1 changed files with 2 additions and 8 deletions

View File

@ -46,10 +46,6 @@
#include "hb-common.h" #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 */ /* We need external help for these */
@ -57,10 +53,6 @@
#include <glib.h> #include <glib.h>
/* 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; 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_fetch_and_add(AI, V) g_atomic_int_exchange_and_add (&(AI), V)
#define hb_atomic_int_get(AI) g_atomic_int_get (&(AI)) #define hb_atomic_int_get(AI) g_atomic_int_get (&(AI))
@ -78,6 +70,8 @@ typedef GStaticMutex hb_mutex_t;
#endif #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_put_unaligned(v,V) (v[0] = (V), 0)
#define hb_be_uint8_get_unaligned(v) (uint8_t) (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]) #define hb_be_uint8_cmp_unaligned(a,b) (a[0] == b[0])