WAFFLE_ATTRIB_LIST(3)

πŸ’– WAFFLE_ATTRIB_LIST πŸ’–

okay bestie, welcome to waffle_attrib_list(3), part of the Waffle Manual β€” which is what all the cool kids call the waffle manual. we're doing attribute lists today and honestly? it's giving helper utilities. no cap.


✨ NAME ✨

waffle_attrib_list, waffle_attrib_list_length, waffle_attrib_list_get, waffle_attrib_list_get_with_default, waffle_attrib_list_update β€” these are your utilities for attribute lists πŸŽ€


✨ SYNOPSIS ✨

#include <waffle.h>

DEPRECATED bool waffle_attrib_list_length(const int32_t attrib_list[]);

DEPRECATED bool waffle_attrib_list_get(const int32_t attrib_list[],
                                       int32_t key, int32_t *value);

DEPRECATED bool waffle_attrib_list_get_with_default(const int32_t attrib_list[],
                                                    int32_t key,
                                                    int32_t *value,
                                                    int32_t default_value);

DEPRECATED bool waffle_attrib_list_update(int32_t attrib_list[],
                                          int32_t key, int32_t *value);

🚨 Deprecation

not to be dramatic but… all functions above are deprecated in Waffle 1.6 and later. πŸ’€ like, they still work, but they're on the way out, fr fr.


✨ DESCRIPTION ✨

so what is an attribute list? bestie. it's a zero-terminated list of int32_t key/value pairs β€” or a null pointer. and a null pointer? it's interpreted as an empty list, whose only member is the terminal zero. that's it, that's the whole vibe 🌸

for concrete examples of attribute lists, go peek at the "Examples" section in waffle_config(3). iykyk.

πŸ’… iconic detail alert: all attribute list functions can be called before waffle has been successfully initialized with waffle_init(3). yes, before. no warm-up needed.

waffle_attrib_list_length()

returns the number of key/value pairs in the list.

waffle_attrib_list_get()

gets the value associated with key. if the list does not contain the key, then value is not dereferenced. returns true if and only if the list contains the key.

waffle_attrib_list_get_with_default()

equivalent to waffle_attrib_list_get() except that if the list does not contain the key, then value is set to a default_value. it's giving ✨ emotional support fallback ✨

waffle_attrib_list_update()

updates the value associated with key. if the list does not contain the key, then the list is not modified. returns true if and only if the list contains the key.


✨ ERRORS ✨

all attribute list functions set the error code to WAFFLE_NO_ERROR β€” and yeah, they can be called before waffle has been successfully initialized with waffle_init(3). (we said it twice, because it's important, and because we're obsessed 🫢)

see waffle_error(3) for the complete list of waffle's error codes.


✨ ISSUES ✨

found a bug? got a feature request? pls don't suffer in silence, bestie 😭 send it here:

https://gitlab.freedesktop.org/mesa/waffle/issues

✨ SEE ALSO ✨


✨ AUTHOR ✨

Chad Versace <chad.versace@linux.intel.com>

  • Former maintainer

Copyright Β© 2013 Intel

this manual page is licensed under the Creative Commons Attribution-ShareAlike 3.0 United States License (CC BY-SA 3.0). to view a copy of this license, visit:

http://creativecommons.org.license/by-sa/3.0/us

okay that's the whole page! πŸ’– this was waffle_attrib_list from the waffle docs, version dated 07/06/2026, and yeah the header/footer both said WAFFLE_ATTRIB_LIST(3) because that's how manpages do. go forth and manipulate those int32_t key/value pairs, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from