Go to the documentation of this file.
18#define OXR_TWO_CALL_HELPER(log, cnt_input, cnt_output, output, count, data, sval) \
20 if ((cnt_output) == NULL) { \
21 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, #cnt_output); \
23 *(cnt_output) = (uint32_t)(count); \
25 if ((cnt_input) == 0) { \
28 if ((cnt_input) < (uint32_t)(count)) { \
29 return oxr_error(log, XR_ERROR_SIZE_INSUFFICIENT, #cnt_input); \
31 for (uint32_t i = 0; i < (count); i++) { \
32 (output)[i] = (data)[i]; \
38#define OXR_TWO_CALL_FILL_IN_HELPER(log, cnt_input, cnt_output, output_structs, count, fill_fn, source_structs, sval) \
40 if (cnt_output == NULL) { \
41 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, #cnt_output); \
43 *cnt_output = count; \
45 if (cnt_input == 0) { \
48 if (cnt_input < count) { \
49 return oxr_error(log, XR_ERROR_SIZE_INSUFFICIENT, #cnt_input); \
51 for (uint32_t i = 0; i < count; i++) { \
52 fill_fn(&output_structs[i], &source_structs[i]); \