qsort の macos ドキュメントには、次の宣言があります。
void qsort_b(void *base, size_t nel, size_t width, int (^compar)(const void *, const void *));
キャレットの意味は何ですか?
qsort の macos ドキュメントには、次の宣言があります。
void qsort_b(void *base, size_t nel, size_t width, int (^compar)(const void *, const void *));
キャレットの意味は何ですか?
関数宣言の ^ は、コールバックが関数ポインターではなくブロック ポインターであることを示します。
マニュアルページの後半で述べたように:
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.