diff -r b9715d7317c1 -r 8f0a3c00d1d2 src/ucx/array.h
--- a/src/ucx/array.h Thu Jul 11 10:11:43 2019 +0200
+++ b/src/ucx/array.h Tue Aug 06 16:26:46 2019 +0200
@@ -199,64 +199,6 @@
void *ucx_array_at(UcxArray array, size_t index);
/**
- * Returns an element of the specified type by value.
- *
- * This expression can also be assigned to.
- *
- * If sizeof(type)
does not equal the array's element size, the
- * behavior is undefined.
- * If the index is out of bounds, the behavior is undefined.
- *
- * @param type the type of the element
- * @param array the array to retrieve the element from
- * @param index index of the element to return
- * @return the requested element
- * @see ucx_array_at()
- */
-#define ucx_array_at_typed(type, array, index) (((type*)((array).data))[index])
-
-/**
- * Shorthand for ucx_array_at_typed().
- */
-#define ucx_array_at_int(arr, i) ucx_array_at_typed(int, arr, i)
-
-/**
- * Shorthand for ucx_array_at_typed().
- */
-#define ucx_array_at_short(arr, i) ucx_array_at_typed(short, arr, i)
-
-/**
- * Shorthand for ucx_array_at_typed().
- */
-#define ucx_array_at_longint(arr, i) ucx_array_at_typed(long int, arr, i)
-
-/**
- * Shorthand for ucx_array_at_typed().
- */
-#define ucx_array_at_uint(arr, i) ucx_array_at_typed(unsigned int, arr, i)
-
-/**
- * Shorthand for ucx_array_at_typed().
- */
-#define ucx_array_at_ushort(arr, i) ucx_array_at_typed(unsigned short, arr, i)
-
-/**
- * Shorthand for ucx_array_at_typed().
- */
-#define ucx_array_at_ulongint(arr, i) \
- ucx_array_at_typed(unsigned long int, arr, i)
-
-/**
- * Shorthand for ucx_array_get_typed().
- */
-#define ucx_array_get_float(arr, i) ucx_array_get_typed(float, arr, i)
-
-/**
- * Shorthand for ucx_array_get_typed().
- */
-#define ucx_array_get_double(arr, i) ucx_array_get_typed(double, arr, i)
-
-/**
* Returns the index of an element containing the specified data.
*
* This function uses a cmp_func() to compare the data of each list element
@@ -290,9 +232,14 @@
int ucx_array_contains(UcxArray array, void *elem, cmp_func cmpfnc, void *data);
/**
- * Sorts a UcxArray with an almost in-place merge sort.
+ * Sorts a UcxArray with the best available sort algorithm.
*
- * This function uses additional memory for exactly one element.
+ * If present, qsort_s() will be used. Otherwise, if no additional data is
+ * specified, qsort() is used as a fall back.
+ *
+ * If qsort_s() is not available and data
is not NULL
,
+ * a custom almost in-place merge sort algorithm is used, which uses additional
+ * memory for exactly one element.
*
* @param array the array to sort
* @param cmpfnc the function that shall be used to compare the element data