[gst-devel] The purpose of the reserved fields in many internal structures
Sebastian Dröge
sebastian.droege at collabora.co.uk
Mon Feb 8 08:31:48 CET 2010
On Sun, 2010-02-07 at 19:45 -0500, José Alburquerque wrote:
> Sorry to ask this question because it's more a "learning" question than
> anything else. If it's not really important please ignore the question.
>
> Would someone be able to tell me why (I'm only asking out of curiosity)
> many internal structures (like GstMiniObject) have a "reserved" field
> generally called "_gst_reserved". Thanks.
It's there to allow later additions to those structures without breaking
ABI. Look at GstBus' instance struct for example.
Without these reserved areas, additions to the structures would change
their size, which would require recompilations of everything using them.
In the case of the instance/class structs all subclasses' instance/class
structs would increase in size too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20100208/b142f24c/attachment.pgp>
More information about the gstreamer-devel
mailing list