[gst-devel] The purpose of the reserved fields in many internal structures
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
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the gstreamer-devel