| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2007,2008,2009 Red Hat, Inc. | 2 * Copyright © 2007,2008,2009 Red Hat, Inc. |
| 3 * Copyright © 2011,2012 Google, Inc. | 3 * Copyright © 2011,2012 Google, Inc. |
| 4 * | 4 * |
| 5 * This is part of HarfBuzz, a text shaping library. | 5 * This is part of HarfBuzz, a text shaping library. |
| 6 * | 6 * |
| 7 * Permission is hereby granted, without written agreement and without | 7 * Permission is hereby granted, without written agreement and without |
| 8 * license or royalty fees, to use, copy, modify, and distribute this | 8 * license or royalty fees, to use, copy, modify, and distribute this |
| 9 * software and its documentation for any purpose, provided that the | 9 * software and its documentation for any purpose, provided that the |
| 10 * above copyright notice and the following two paragraphs appear in | 10 * above copyright notice and the following two paragraphs appear in |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) | 77 #if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__) |
| 78 #define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0) | 78 #define _HB_BOOLEAN_EXPR(expr) ((expr) ? 1 : 0) |
| 79 #define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1)) | 79 #define likely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 1)) |
| 80 #define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0)) | 80 #define unlikely(expr) (__builtin_expect (_HB_BOOLEAN_EXPR(expr), 0)) |
| 81 #else | 81 #else |
| 82 #define likely(expr) (expr) | 82 #define likely(expr) (expr) |
| 83 #define unlikely(expr) (expr) | 83 #define unlikely(expr) (expr) |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 #ifndef __GNUC__ | 86 #if !defined(__GNUC__) && !defined(__clang__) |
| 87 #undef __attribute__ | 87 #undef __attribute__ |
| 88 #define __attribute__(x) | 88 #define __attribute__(x) |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 #if __GNUC__ >= 3 | 91 #if __GNUC__ >= 3 |
| 92 #define HB_PURE_FUNC __attribute__((pure)) | 92 #define HB_PURE_FUNC __attribute__((pure)) |
| 93 #define HB_CONST_FUNC __attribute__((const)) | 93 #define HB_CONST_FUNC __attribute__((const)) |
| 94 #define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf_
_, format_idx, arg_idx))) | 94 #define HB_PRINTF_FUNC(format_idx, arg_idx) __attribute__((__format__ (__printf_
_, format_idx, arg_idx))) |
| 95 #else | 95 #else |
| 96 #define HB_PURE_FUNC | 96 #define HB_PURE_FUNC |
| (...skipping 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1012 if (unlikely (!_hb_options.i)) | 1012 if (unlikely (!_hb_options.i)) |
| 1013 _hb_options_init (); | 1013 _hb_options_init (); |
| 1014 | 1014 |
| 1015 return _hb_options.opts; | 1015 return _hb_options.opts; |
| 1016 } | 1016 } |
| 1017 | 1017 |
| 1018 /* Size signifying variable-sized array */ | 1018 /* Size signifying variable-sized array */ |
| 1019 #define VAR 1 | 1019 #define VAR 1 |
| 1020 | 1020 |
| 1021 #endif /* HB_PRIVATE_HH */ | 1021 #endif /* HB_PRIVATE_HH */ |
| OLD | NEW |