minor, add HB_USE_INTERNAL_QSORT

The only thing I need for a working wasm in a minimum libc,
otherwise I have to provide the very same qsort inside that libc
This commit is contained in:
Ebrahim Byagowi 2019-06-10 15:17:43 +04:30 committed by GitHub
parent 801d93fc58
commit 9407ef8d4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* /*
* Copyright © 2017 Google, Inc. * Copyright © 2017 Google, Inc.
* Copyright © 2019 Google, Inc. * Copyright © 2019 Facebook, Inc.
* *
* This is part of HarfBuzz, a text shaping library. * This is part of HarfBuzz, a text shaping library.
* *
@ -843,7 +843,7 @@ static inline void
hb_qsort (void *base, size_t nel, size_t width, hb_qsort (void *base, size_t nel, size_t width,
int (*compar)(const void *_a, const void *_b)) int (*compar)(const void *_a, const void *_b))
{ {
#ifdef __OPTIMIZE_SIZE__ #if defined(__OPTIMIZE_SIZE__) && !defined(HB_USE_INTERNAL_QSORT)
qsort (base, nel, width, compar); qsort (base, nel, width, compar);
#else #else
sort_r_simple (base, nel, width, compar); sort_r_simple (base, nel, width, compar);