---
name: "waffle_attrib_list"
section: "3"
platform: "linux"
package: "libwaffle-doc"
version: "1.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/waffle_attrib_list"
---

# waffle\_attrib\_list(3)

Utilities for attribute lists

## NAME

waffle\_attrib\_list, waffle\_attrib\_list\_length, waffle\_attrib\_list\_get, waffle\_attrib\_list\_get\_with\_default, waffle\_attrib\_list\_update - 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

All functions above are deprecated in Waffle 1.6 and later.

## DESCRIPTION

An attribute list is a zero-terminated list of **int32\_t** key/value pairs or a null pointer. A null pointer is interpreted as an empty list, whose only member is the terminal zero. For concrete examples of attribute lists, see the "Examples" section in [**waffle\_config**(3)](/waffle_config/3.md).

All attribute list functions can be called before waffle has been successfully initialized with [**waffle\_init**(3)](/waffle_init/3.md).

**waffle\_attrib\_list\_length()**

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

**waffle\_attrib\_list\_get()**

Get the *value* associated with *key*. If the list does not contain the *key*, then *value* is not dereferenced. Return 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*.

**waffle\_attrib\_list\_update()**

Update the *value* associated with *key*. If the list does not contain the *key* then the list is not modified. Return true if and only if the list contains the *key*.

## ERRORS

All attribute list functions set the error code to **WAFFLE\_NO\_ERROR** and can be called before waffle has been successfully initialized with [**waffle\_init**(3)](/waffle_init/3.md).

See [**waffle\_error**(3)](/waffle_error/3.md) for the complete list of waffle's error codes.

## ISSUES

Please report bugs or and feature requests to **https://gitlab.freedesktop.org/mesa/waffle/issues**.

## SEE ALSO

[**waffle**(7)](/waffle/7.md)

## AUTHOR

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

Former maintainer

## COPYRIGHT

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**.
