[gnome-commander] Adds definitions for C linkage funktions, part 2



commit c383d8d5feb34691f39ad81ebbe154448407ddda
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Fri Apr 28 22:42:15 2017 +0200

    Adds definitions for C linkage funktions, part 2

 plugins/fileroller/file-roller-plugin.cc |   26 ++++++++++++++++----------
 plugins/fileroller/file-roller-plugin.h  |    6 +++++-
 2 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/plugins/fileroller/file-roller-plugin.cc b/plugins/fileroller/file-roller-plugin.cc
index f96cf5d..50ec867 100644
--- a/plugins/fileroller/file-roller-plugin.cc
+++ b/plugins/fileroller/file-roller-plugin.cc
@@ -716,21 +716,27 @@ GnomeCmdPlugin *file_roller_plugin_new ()
 }
 
 
-extern "C" GnomeCmdPlugin *create_plugin ()
+extern "C"
 {
-    return file_roller_plugin_new ();
+    GnomeCmdPlugin *create_plugin ()
+    {
+        return file_roller_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] = (char*) AUTHOR;
-        plugin_nfo.authors[1] = NULL;
-        plugin_nfo.comments = g_strdup (_("A plugin that adds File Roller shortcuts for creating "
-                                          "and extracting compressed archives."));
+        if (!plugin_nfo.authors)
+        {
+            plugin_nfo.authors = g_new0 (gchar *, 2);
+            plugin_nfo.authors[0] = (gchar*) AUTHOR;
+            plugin_nfo.authors[1] = NULL;
+            plugin_nfo.comments = g_strdup (_("A plugin that adds File Roller shortcuts for creating "
+                                            "and extracting compressed archives."));
+        }
+        return &plugin_nfo;
     }
-    return &plugin_nfo;
 }
diff --git a/plugins/fileroller/file-roller-plugin.h b/plugins/fileroller/file-roller-plugin.h
index 46c5a8b..4e7ec57 100644
--- a/plugins/fileroller/file-roller-plugin.h
+++ b/plugins/fileroller/file-roller-plugin.h
@@ -53,5 +53,9 @@ struct _FileRollerPluginClass
 GtkType file_roller_plugin_get_type ();
 
 GnomeCmdPlugin *file_roller_plugin_new ();
-
+extern "C"
+{
+    GnomeCmdPlugin *create_plugin ();
+    PluginInfo     *get_plugin_info ();
+}
 #endif //__FILE_ROLLER_PLUGIN_H__


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