* uint32_t* pQueueFamilyPropertyCount,
* VkQueueFamilyProperties* pQueueFamilyProperties)
* {
- * VK_OUTARRAY_MAKE(props, pQueueFamilyProperties,
- * pQueueFamilyPropertyCount);
+ * VK_OUTARRAY_MAKE_TYPED(VkQueueFamilyProperties, props,
+ * pQueueFamilyProperties,
+ * pQueueFamilyPropertyCount);
*
- * vk_outarray_append(&props, p) {
+ * vk_outarray_append_typed(VkQueueFamilyProperties, &props, p) {
* p->queueFlags = ...;
* p->queueCount = ...;
* }
*
- * vk_outarray_append(&props, p) {
+ * vk_outarray_append_typed(VkQueueFamilyProperties, &props, p) {
* p->queueFlags = ...;
* p->queueCount = ...;
* }
#define vk_outarray_init(a, data, len) \
__vk_outarray_init(&(a)->base, (data), (len))
-#define VK_OUTARRAY_MAKE(name, data, len) \
- VK_OUTARRAY_MAKE_TYPED(__typeof__((data)[0]), name, data, len)
#define VK_OUTARRAY_MAKE_TYPED(type, name, data, len) \
vk_outarray(type) name; \
vk_outarray_init(&name, (data), (len))
*
* This is a block-based macro. For example:
*
- * vk_outarray_append(&a, elem) {
+ * vk_outarray_append_typed(T, &a, elem) {
* elem->foo = ...;
* elem->bar = ...;
* }
*
* The array `a` has type `vk_outarray(elem_t) *`. It is usually declared with
- * VK_OUTARRAY_MAKE(). The variable `elem` is block-scoped and has type
+ * VK_OUTARRAY_MAKE_TYPED(). The variable `elem` is block-scoped and has type
* `elem_t *`.
*
* The macro unconditionally increments the array's `wanted_len`. If the array
* executes the block. When the block is executed, `elem` is non-null and
* points to the newly appended element.
*/
-#define vk_outarray_append(a, elem) \
- vk_outarray_append_typed(vk_outarray_typeof_elem(a), a, elem)
#define vk_outarray_append_typed(type, a, elem) \
for (type *elem = vk_outarray_next_typed(type, a); \
elem != NULL; elem = NULL)