PipeWire  0.2.0
array.h File Reference
Include dependency graph for array.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  pw_array
 An array object. More...
 

Macros

#define PW_ARRAY_INIT(extend)   (struct pw_array) { NULL, 0, 0, extend }
 
#define pw_array_get_len_s(a, s)   ((a)->size / (s))
 
#define pw_array_get_unchecked_s(a, idx, s, t)   SPA_MEMBER((a)->data,(idx)*(s),t)
 
#define pw_array_check_index_s(a, idx, s)   ((idx) < pw_array_get_len_s(a,s))
 
#define pw_array_for_each(pos, array)
 

Macro Definition Documentation

◆ pw_array_check_index_s

#define pw_array_check_index_s (   a,
  idx,
 
)    ((idx) < pw_array_get_len_s(a,s))

◆ pw_array_for_each

#define pw_array_for_each (   pos,
  array 
)
Value:
for (pos = (__typeof__(pos)) (array)->data; \
(const uint8_t *) pos < ((const uint8_t *) (array)->data + (array)->size); \
(pos)++)

Referenced by pw_map::pw_map_for_each(), pw_properties::pw_properties_copy(), and pw_properties::pw_properties_free().

◆ pw_array_get_len_s

#define pw_array_get_len_s (   a,
 
)    ((a)->size / (s))

◆ pw_array_get_unchecked_s

#define pw_array_get_unchecked_s (   a,
  idx,
  s,
 
)    SPA_MEMBER((a)->data,(idx)*(s),t)

◆ PW_ARRAY_INIT

#define PW_ARRAY_INIT (   extend)    (struct pw_array) { NULL, 0, 0, extend }