diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2018-11-27 17:40:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-27 17:40:09 -0500 |
commit | 4e2a03b6b6e0c0d1c4edea10dc1aae63eeb6c581 (patch) | |
tree | dd8266d22bb00b04fff7d159ad56aa1fd0a6e7bb | |
parent | 4a719a7f4c997ea7e47588bc0288c97706dae015 (diff) | |
download | harfbuzz-4e2a03b6b6e0c0d1c4edea10dc1aae63eeb6c581.tar.gz |
Comment
-rw-r--r-- | src/hb-machinery.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/hb-machinery.hh b/src/hb-machinery.hh index c3848415..0e75c824 100644 --- a/src/hb-machinery.hh +++ b/src/hb-machinery.hh @@ -692,8 +692,10 @@ struct BEInt<Type, 2> inline operator Type (void) const { #if defined(__GNUC__) || defined(__clang__) + /* Spoon-feed the compiler a big-endian integer with alignment 1. + * https://github.com/harfbuzz/harfbuzz/pull/1398 */ struct __attribute__((packed)) packed_uint16_t { uint16_t v; }; - return __builtin_bswap16(((packed_uint16_t *) this)->v); + return __builtin_bswap16 (((packed_uint16_t *) this)->v); #endif return (v[0] << 8) + (v[1] ); |