Fix conflict between the specialized version of sort in array

and the generic version in algo so that we can use the same
prefix for both generation.
This commit is contained in:
Patrick Pelissier committed 2017-07-27 22:19:27 +02:00
1 parent 34943e5b2a
commit f8a1832fce
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -248,7 +248,7 @@ test_dict_str(unsigned long n)
/********************************************************************************************/
ARRAY_DEF(array_float, float)
ALGO_DEF(afloat, ARRAY_OPLIST(array_float))
ALGO_DEF(array_float, ARRAY_OPLIST(array_float))
static void test_sort(size_t n)
{
@@ -256,7 +256,7 @@ static void test_sort(size_t n)
for(size_t i = 0; i < n; i++) {
array_float_push_back(a1, rand_get() );
}
afloat_sort(a1);
array_float_sort(a1);
g_result = *array_float_get(a1, 0);
}
}
+2 -2
View File
@@ -76,7 +76,7 @@
,PUSH(M_C(name,_push_back)) \
,POP(M_C(name,_pop_back)) \
,OPLIST(oplist) \
,M_IF_METHOD(CMP, oplist)(SORT(M_C(name, _sort)),) \
,M_IF_METHOD(CMP, oplist)(SORT(M_C(name, _special_sort)),) \
,M_IF_METHOD(GET_STR, oplist)(GET_STR(M_C(name, _get_str)),) \
,M_IF_METHOD(OUT_STR, oplist)(OUT_STR(M_C(name, _out_str)),) \
,M_IF_METHOD(IN_STR, oplist)(IN_STR(M_C(name, _in_str)),) \
@@ -607,7 +607,7 @@
\
M_IF_METHOD(CMP, oplist) \
( \
static inline void M_C(name, _sort)(array_t l, \
static inline void M_C(name, _special_sort)(array_t l, \
int (*func_type) (const type *a, const type *b)) \
{ \
/* Using qsort is more compact but slower than a full templated \