Go to the documentation of this file.
17#define OXR_TWO_CALL_CHECK_ONLY(log, cnt_input, cnt_output, count, sval) \
19 if ((cnt_output) == NULL) { \
20 return oxr_error(log, XR_ERROR_VALIDATION_FAILURE, #cnt_output); \
22 *(cnt_output) = (uint32_t)(count); \
24 if ((cnt_input) == 0) { \
27 if ((cnt_input) < (uint32_t)(count)) { \
28 return oxr_error(log, XR_ERROR_SIZE_INSUFFICIENT, #cnt_input); \
32#define OXR_TWO_CALL_CHECK_GOTO(log, cnt_input, cnt_output, count, sval, goto_label) \
34 if ((cnt_output) == NULL) { \
35 sval = oxr_error(log, XR_ERROR_VALIDATION_FAILURE, #cnt_output); \
38 *(cnt_output) = (uint32_t)(count); \
40 if ((cnt_input) == 0) { \
43 if ((cnt_input) < (uint32_t)(count)) { \
44 sval = oxr_error(log, XR_ERROR_SIZE_INSUFFICIENT, #cnt_input); \
49#define OXR_TWO_CALL_HELPER(log, cnt_input, cnt_output, output, count, data, sval) \
51 OXR_TWO_CALL_CHECK_ONLY(log, cnt_input, cnt_output, count, sval); \
53 for (uint32_t i = 0; i < (count); i++) { \
54 (output)[i] = (data)[i]; \
60#define OXR_TWO_CALL_FILL_IN_HELPER(log, cnt_input, cnt_output, output_structs, count, fill_fn, source_structs, sval) \
62 OXR_TWO_CALL_CHECK_ONLY(log, cnt_input, cnt_output, count, sval); \
64 for (uint32_t i = 0; i < count; i++) { \
65 fill_fn(&output_structs[i], &source_structs[i]); \
71#define OXR_TWO_CALL_FILL_IN_GOTO(log, cnt_input, cnt_output, output_structs, count, fill_macro, source_structs, sval, \
74 OXR_TWO_CALL_CHECK_GOTO(log, cnt_input, cnt_output, count, sval, goto_label); \
76 for (uint32_t i = 0; i < count; i++) { \
77 fill_macro(output_structs[i], source_structs[i]); \