| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright © 2012 Google, Inc. | 2 * Copyright © 2012 Google, Inc. |
| 3 * | 3 * |
| 4 * This is part of HarfBuzz, a text shaping library. | 4 * This is part of HarfBuzz, a text shaping library. |
| 5 * | 5 * |
| 6 * Permission is hereby granted, without written agreement and without | 6 * Permission is hereby granted, without written agreement and without |
| 7 * license or royalty fees, to use, copy, modify, and distribute this | 7 * license or royalty fees, to use, copy, modify, and distribute this |
| 8 * software and its documentation for any purpose, provided that the | 8 * software and its documentation for any purpose, provided that the |
| 9 * above copyright notice and the following two paragraphs appear in | 9 * above copyright notice and the following two paragraphs appear in |
| 10 * all copies of this software. | 10 * all copies of this software. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 #define HB_SHAPER_IMPLEMENT(name) {#name, _hb_##name##_shape}, | 33 #define HB_SHAPER_IMPLEMENT(name) {#name, _hb_##name##_shape}, |
| 34 #include "hb-shaper-list.hh" | 34 #include "hb-shaper-list.hh" |
| 35 #undef HB_SHAPER_IMPLEMENT | 35 #undef HB_SHAPER_IMPLEMENT |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 | 38 |
| 39 /* Thread-safe, lock-free, shapers */ | 39 /* Thread-safe, lock-free, shapers */ |
| 40 | 40 |
| 41 static const hb_shaper_pair_t *static_shapers; | 41 static const hb_shaper_pair_t *static_shapers; |
| 42 | 42 |
| 43 static | 43 static inline |
| 44 void free_static_shapers (void) | 44 void free_static_shapers (void) |
| 45 { | 45 { |
| 46 if (unlikely (static_shapers != all_shapers)) | 46 if (unlikely (static_shapers != all_shapers)) |
| 47 free ((void *) static_shapers); | 47 free ((void *) static_shapers); |
| 48 } | 48 } |
| 49 | 49 |
| 50 const hb_shaper_pair_t * | 50 const hb_shaper_pair_t * |
| 51 _hb_shapers_get (void) | 51 _hb_shapers_get (void) |
| 52 { | 52 { |
| 53 retry: | 53 retry: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 goto retry; | 100 goto retry; |
| 101 } | 101 } |
| 102 | 102 |
| 103 #ifdef HAVE_ATEXIT | 103 #ifdef HAVE_ATEXIT |
| 104 atexit (free_static_shapers); /* First person registers atexit() callback. *
/ | 104 atexit (free_static_shapers); /* First person registers atexit() callback. *
/ |
| 105 #endif | 105 #endif |
| 106 } | 106 } |
| 107 | 107 |
| 108 return shapers; | 108 return shapers; |
| 109 } | 109 } |
| OLD | NEW |