0

在 qsort 的 macos 文档中,我们看到了声明:

void qsort_b(void *base, size_t nel, size_t width, int (^compar)(const void *, const void *));

插入符号的含义是什么?

4

1 回答 1

1

函数声明中的 ^ 表示回调是块指针而不是函数指针。

如手册页后面所述:

The heapsort_b(), mergesort_b(), and qsort_b() routines are like the corresponding routines without the _b suffix, expect that the compar
callback is a block pointer instead of a function pointer.
于 2020-10-01T11:07:34.153 回答