GNOME Bugzilla – Bug 697872
plugin: fix name expansion in GST_PLUGIN_DEFINE() macro
Last modified: 2013-04-13 10:49:01 UTC
Created attachment 241346 [details] [review] plugin: fix name expansion in GST_PLUGIN_DEFINE() macro Hi, this patch makes GST_PLUGIN_DEFINE use G_STRINGIFY() to convert the name argument into a meaningful string. The advantage of this is that `name' can be expanded from other macros defined in the plug-in element. So, if I have the following: #define PLUGIN_NAME(NAME) NAME GST_PLUGIN_DEFINE(major, minor, PLUGIN_NAME(vaapi), ...) this now expands to "vaapi" instead of PLUGIN_NAME(vaapi) :) PS: sorry, the padding used to the next '\' is spaces instead of tabs. I can change it to tabs so that to be consistent with surrounding lines.
I'm intruiged by your need to make the plugin name a macro, but it seems reasonable enough to use G_STRINGIFY here. Generally there shouldn't be any tabs anywhere in headers, but let's leave it for someone to clean it all up some other day ;) commit f43b756f39fe8fbe90e56b699a80ca3d599a6b1e Author: Gwenole Beauchesne <gwenole.beauchesne@intel.com> Date: Fri Apr 12 14:48:29 2013 +0200 plugin: fix name expansion for GST_PLUGIN_DEFINE macro Make GST_PLUGIN_DEFINE use G_STRINGIFY() to convert the name argument into a meaningful string. The advantage of this is that `name' can be expanded from other macros defined in the plug-in element. Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com> https://bugzilla.gnome.org/show_bug.cgi?id=697872