Skip to content

spa: pod parser: Make `get_pod()` method safe, return safe &crate::pod::Pod instead of raw ptr, add Pod(_) variant to parser macro.

Tom Wagner requested to merge ryuukyu/pipewire-rs:spa-pod-parser-pod into main

The sys method guarentees that it returns either an error or a valid pod that fits in the parsers memory slice, so we can safely convert the raw pod into the safe reference wrapper type and also make the function safe.

Also adds it to the parser_get!() macro.

(And a couple cosmetic fixes I ran into while working on this)

Merge request reports