GNOME Bugzilla – Bug 673491
Remove "default" get_caps implemetations
Last modified: 2012-11-01 23:17:57 UTC
All the plugins have the same get_caps implementation: static GrlCaps * grl_<plugin_name>_source_get_caps (GrlMetadataSource *source, GrlSupportedOps operation) { static GrlCaps *caps = NULL; if (caps == NULL) caps = grl_caps_new (); return caps; } Remove all those, and use the default implementation from the class. That'll also stop us leaking the caps object for each plugin.
There's already a default implementation: http://git.gnome.org/browse/grilo/tree/src/grl-metadata-source.c#n1616
Created attachment 212016 [details] [review] all: Remove ->get_caps stubs The default implementation does the exact same thing, and this saves us some code.
Created attachment 227845 [details] [review] all: Remove ->get_caps stubs The default implementation does the exact same thing, and this saves us some code. https://bugzilla.gnome.org/show_bug.cgi?id=673491 Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
commit 33f410586efff2c8a089068c981c7db54dff438b Author: Bastien Nocera <hadess@hadess.net> Date: Thu Nov 1 23:15:05 2012 +0000 all: Remove ->get_caps stubs The default implementation does the exact same thing, and this saves us some code. https://bugzilla.gnome.org/show_bug.cgi?id=673491 Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com> src/apple-trailers/grl-apple-trailers.c | 16 ---------------- src/bliptv/grl-bliptv.c | 16 ---------------- src/bookmarks/grl-bookmarks.c | 16 ---------------- src/flickr/grl-flickr.c | 16 ---------------- src/jamendo/grl-jamendo.c | 16 ---------------- src/optical-media/grl-optical-media.c | 19 ------------------- src/podcasts/grl-podcasts.c | 16 ---------------- src/shoutcast/grl-shoutcast.c | 16 ---------------- src/upnp/grl-upnp.c | 16 ---------------- src/vimeo/grl-vimeo.c | 16 ---------------- src/youtube/grl-youtube.c | 16 ---------------- 11 files changed, 179 deletions(-) Attachment 227845 [details] pushed as 33f4105 - all: Remove ->get_caps stubs