Skip to content

gstbuffer/gstmemory: Mark info in map functions as caller-allocates and pass allocation params as const pointers where possible

Safe excerpt from !729

This updates the few functions that do not require typedef'ed functions or function pointers to change, the latter of which can at the very least cause warnings on downstream projects and the former which will change C++ function signatures and potentially make external projects incompatible.

(original message)
For Rust we'd really like G-IR annotations to be on point to save us from overriding mutability of various parameters [or oddly pass something seemingly-immutable as mutable], and at the same time enforcing the same rules here in C.

Since this does not change any API surface (anyone is free to pass a T * into a const T *) we should be able to give this Needs backport 1.18 and benefit from it in G-IR + Rust as well.

CC @slomo and @tpm, thanks for all the review and help thus far!

Edited by Sebastian Dröge

Merge request reports