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 317041 - GstObject flags should be made real flags
GstObject flags should be made real flags
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.9.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-23 14:54 UTC by Tim-Philipp Müller
Modified: 2005-10-13 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2005-09-23 14:54:29 UTC
Given the unintuitive way that flags are implemented for GstObject and
GstElement (ie. enums that specify a shift instead of the actual bitmask for the
flag), we should under no circumstances export an accessor API that gives access
to the flags bitmask. That is just begging for wrong usage like

  if ((GST_FLAGS(obj) & FOO_IS_BLA_FLAG)) {
    ...
  }

IMHO we should make sure that flags can only be tested with our own
GST_FLAG_IS_SET, GST_FLAG_SET and GST_FLAG_UNSET. For the same reason, the
'flags' member of GstObject should be moved into the private block IMHO.

Cheers
 -Tim
Comment 1 David Schleef 2005-09-23 16:43:50 UTC
Or fix the flags.
Comment 2 Tim-Philipp Müller 2005-10-13 15:07:12 UTC
Stefan has fixed the flags, closing.