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 に答える