gnomemm r2026 - in gstreamermm/trunk: . tools/extra_defs_gen



Author: jaalburqu
Date: Thu Jan 29 21:22:29 2009
New Revision: 2026
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2026&view=rev

Log:
2009-01-29  Josà Alburquerque  <jaalburqu svn gnome org>

	* tools/extra_defs_gen/generate_plugin_gmmproc_file.cc: Modified so
	that plug-in enum generated *_get_type() functions are static to the
	*.cc file (only callable within the generated .cc file) to fix
	Gst::init() related warnings when gst_dp_init() tries to call the
	GStreamer gst_dp_version_get_type() to initialize its GstDPVersion
	enum and winds up calling the generated one in gdppay.cc.

Modified:
   gstreamermm/trunk/ChangeLog
   gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc

Modified: gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc
==============================================================================
--- gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc	(original)
+++ gstreamermm/trunk/tools/extra_defs_gen/generate_plugin_gmmproc_file.cc	Thu Jan 29 21:22:29 2009
@@ -233,7 +233,7 @@
             get_cast_macro(propertyCType).lowercase() + "_get_type";
 
           enumGTypeFunctionDefinitions +=
-            "extern \"C\" GType " + enumGetTypeFunctionName + "()\n" +
+            "static GType " + enumGetTypeFunctionName + "()\n" +
             "{\n" +
             "  return g_type_from_name(\"" + propertyCType + "\");\n" +
             "}\n\n";
@@ -491,7 +491,9 @@
 
   Glib::ustring getTypeName = castMacro.lowercase() + "_get_type";
 
-  std::cout << "extern \"C\" GType " << getTypeName << "();" << std::endl;
+  std::cout << "extern \"C\"" << std::endl;
+  std::cout << "{" << std::endl << std::endl;
+
   std::cout << "GType " << getTypeName << "()" << std::endl;
   std::cout << "{" << std::endl;
   std::cout << "  static GType type = 0;" << std::endl;
@@ -519,6 +521,8 @@
 
   std::cout << enumGTypeFunctionDefinitions;
 
+  std::cout << "} // extern \"C\"" << std::endl << std::endl;
+
   std::cout << "namespace " << nmspace << std::endl;
   std::cout << "{" << std::endl << std::endl;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]