GNOME Bugzilla – Bug 123889
need padding in structs
Last modified: 2004-12-22 21:47:04 UTC
GStreamer structs/objects need padding added to them before 0.8.
Patch attached. Adds GST_STRUCT_PADDING, GST_OBJECT_PADDING, and GST_CLASS_PADDING to all public objects and classes, and most non-trivial structures. Padding size is currently 4 void pointers.
Created attachment 20515 [details] [review] add padding
Hm, it looks good, but how do you want to extend this later? By using unions? i.e.: union { GST_WHATEVER_PADDING, actual_thing_goes_here } ext; ? Or something else? Because if you make everything macros, actually implementing the extensions later will still require us to either use unions or to not use the macro. ;).
When something needs to be added, we need to replace the macro with whatever the macro resolves as, and modify accordingly. A union isn't a bad idea, since it's a way to always ensure that the structure never changes size. It doesn't really matter. The point of the macro is to actually put it in every structure.
Checked in.