The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

u/misc: Improve docs of calloc macros.

+8
+8
src/xrt/auxiliary/util/u_misc.h
··· 24 24 * Use instead of a bare calloc, but only when U_TYPED_CALLOC and 25 25 * U_TYPED_ARRAY_CALLOC do not meet your needs. 26 26 * 27 + * - If you are using `U_CALLOC_WITH_CAST(struct MyStruct, sizeof(MyStruct))` to 28 + * allocate a single structure of fixed size, you should actually use 29 + * `U_TYPED_CALLOC(struct MyStruct)`. 30 + * 31 + * - If you are using `U_CALLOC_WITH_CAST(struct MyStruct, sizeof(MyStruct) * 32 + * n)` to allocate an array, you should actually use 33 + * `U_TYPED_ARRAY_CALLOC(struct MyStruct, n)`. 34 + * 27 35 * @ingroup aux_util 28 36 */ 29 37 #define U_CALLOC_WITH_CAST(TYPE, SIZE) ((TYPE *)calloc(1, SIZE))