[gnome-commander/ConvertWarningsToErrors] Adds definitions for C linkage funktions



commit 5c03f7676ec738ba4c2e23f096bcaf0110199f8e
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Fri Apr 28 19:31:34 2017 +0200

    Adds definitions for C linkage funktions

 plugins/test/test-plugin.cc |   28 ++++++++++++++++------------
 plugins/test/test-plugin.h  |    5 +++++
 2 files changed, 21 insertions(+), 12 deletions(-)
---
diff --git a/plugins/test/test-plugin.cc b/plugins/test/test-plugin.cc
index a367820..232d46c 100644
--- a/plugins/test/test-plugin.cc
+++ b/plugins/test/test-plugin.cc
@@ -209,22 +209,26 @@ GnomeCmdPlugin *test_plugin_new ()
 }
 
 
-extern "C" GnomeCmdPlugin *create_plugin ()
+extern "C"
 {
-    return test_plugin_new ();
+    GnomeCmdPlugin *create_plugin ()
+    {
+        return test_plugin_new ();
+    }
 }
 
-
-extern "C" PluginInfo *get_plugin_info ()
+extern "C"
 {
-    if (!plugin_nfo.authors)
+    PluginInfo *get_plugin_info ()
     {
-        plugin_nfo.authors = g_new0 (gchar *, 2);
-        plugin_nfo.authors[0] = AUTHOR;
-        plugin_nfo.authors[1] = NULL;
-        plugin_nfo.comments = g_strdup (_("This is an example plugin that is mostly useful as a "
-                                          "simple example for aspiring plugin hackers"));
+        if (!plugin_nfo.authors)
+        {
+            plugin_nfo.authors = g_new0 (gchar *, 2);
+            plugin_nfo.authors[0] = AUTHOR;
+            plugin_nfo.authors[1] = NULL;
+            plugin_nfo.comments = g_strdup (_("This is an example plugin that is mostly useful as a "
+                                            "simple example for aspiring plugin hackers"));
+        }
+        return &plugin_nfo;
     }
-
-    return &plugin_nfo;
 }
diff --git a/plugins/test/test-plugin.h b/plugins/test/test-plugin.h
index 52a716b..0dfc577 100644
--- a/plugins/test/test-plugin.h
+++ b/plugins/test/test-plugin.h
@@ -50,5 +50,10 @@ struct _TestPluginClass
 GtkType test_plugin_get_type ();
 
 GnomeCmdPlugin *test_plugin_new ();
+extern "C"
+{
+    GnomeCmdPlugin *create_plugin   ();
+    PluginInfo     *get_plugin_info ();
+}
 
 #endif //__TEST_PLUGIN_H__


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