pod: struct has spa_pod as the body

This commit is contained in:
Wim Taymans 2025-04-14 17:13:54 +02:00
parent 2f21b27397
commit 4774178c68
2 changed files with 4 additions and 1 deletions

View file

@ -107,7 +107,7 @@ SPA_API_POD_ITER struct spa_pod_control *spa_pod_control_next(const struct spa_p
(iter) = (__typeof__(iter))spa_pod_next(iter))
#define SPA_POD_STRUCT_FOREACH(obj, iter) \
SPA_POD_FOREACH(SPA_POD_BODY(obj), SPA_POD_BODY_SIZE(obj), iter)
SPA_POD_FOREACH(SPA_POD_STRUCT_BODY(obj), SPA_POD_BODY_SIZE(obj), iter)
#define SPA_POD_OBJECT_BODY_FOREACH(body, size, iter) \
for ((iter) = spa_pod_prop_first(body); \

View file

@ -138,6 +138,9 @@ struct spa_pod_choice {
struct spa_pod_choice_body body;
};
#define SPA_POD_STRUCT_BODY(pod) SPA_PTROFF((pod),sizeof(struct spa_pod),struct spa_pod)
#define SPA_POD_STRUCT_BODY_CONST(pod) SPA_PTROFF((pod),sizeof(struct spa_pod),const struct spa_pod)
struct spa_pod_struct {
struct spa_pod pod;
/* one or more spa_pod follow */