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 337103 - small cleanup in gstplugin.c
small cleanup in gstplugin.c
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.10.5
Other Linux
: Normal normal
: 0.10.5
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-04-03 22:16 UTC by Paolo Borelli
Modified: 2006-04-04 17:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.65 KB, patch)
2006-04-03 22:18 UTC, Paolo Borelli
committed Details | Review

Description Paolo Borelli 2006-04-03 22:16:35 UTC
I was taking a look at the file and noticed that the licenses list should be constified.

I also noticed that there is a parent_class variable, but G_DEFINE_TYPE already takes care of defining and initializing a gst_plugin_parent_class variable. Note that the 'canonical' gobject way to init the parent class is g_type_class_peek_parent, which G_DEFINE_TYPE uses. gstplugin instead used g_type_class_ref, I have no idea if there is a rationale for using that or if instead all the uses in gstreamer should be changed...
Comment 1 Paolo Borelli 2006-04-03 22:18:16 UTC
Created attachment 62703 [details] [review]
patch
Comment 2 Tim-Philipp Müller 2006-04-04 17:59:02 UTC
Committed, thanks!

I don't think there was a particular reason for the g_type_class_ref(), it was probably just a copy'n'paste from bad (old) boilerplate code from somewhere else. There are lots of those refs in GStreamer code.


 2006-04-04  Tim-Philipp Müller  <tim at centricular dot net>

       Patch by: Paolo Borelli  <pborelli at katamail dot com>

       * gst/gstplugin.c: (gst_plugin_finalize), (gst_plugin_class_init),
       (gst_plugin_check_license):
         minor clean-up: G_DEFINE_TYPE already takes care of the parent_class
         stuff, no need to do it twice. Mark array of license strings as
         constant. (#337103)