After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 123889 - need padding in structs
need padding in structs
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal major
: 0.7.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2003-10-05 11:59 UTC by Benjamin Otte (Company)
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add padding (17.65 KB, patch)
2003-10-06 19:48 UTC, David Schleef
none Details | Review

Description Benjamin Otte (Company) 2003-10-05 11:59:41 UTC
GStreamer structs/objects need padding added to them before 0.8.
Comment 1 David Schleef 2003-10-06 19:48:16 UTC
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.
Comment 2 David Schleef 2003-10-06 19:48:44 UTC
Created attachment 20515 [details] [review]
add padding
Comment 3 Ronald Bultje 2003-10-07 09:21:48 UTC
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. ;).
Comment 4 David Schleef 2003-10-07 18:35:43 UTC
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.
Comment 5 David Schleef 2003-10-07 21:59:14 UTC
Checked in.