mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pipewire: map: allow lookup and iteration on const maps
This commit is contained in:
parent
8256a2d5a6
commit
caf6156e32
1 changed files with 3 additions and 3 deletions
|
|
@ -189,7 +189,7 @@ static inline void pw_map_remove(struct pw_map *map, uint32_t id)
|
|||
* \param id the index to look at
|
||||
* \return the item at \a id or NULL when no such item exists
|
||||
*/
|
||||
static inline void *pw_map_lookup(struct pw_map *map, uint32_t id)
|
||||
static inline void *pw_map_lookup(const struct pw_map *map, uint32_t id)
|
||||
{
|
||||
if (SPA_LIKELY(pw_map_check_id(map, id))) {
|
||||
union pw_map_item *item = pw_map_get_item(map, id);
|
||||
|
|
@ -207,7 +207,7 @@ static inline void *pw_map_lookup(struct pw_map *map, uint32_t id)
|
|||
* \param data data to pass to \a func
|
||||
* \return the result of the last call to \a func or 0 when all callbacks returned 0.
|
||||
*/
|
||||
static inline int pw_map_for_each(struct pw_map *map,
|
||||
static inline int pw_map_for_each(const struct pw_map *map,
|
||||
int (*func) (void *item_data, void *data), void *data)
|
||||
{
|
||||
union pw_map_item *item;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue