gplugin/gplugin

Parents 156cc08c771e
Children cb0eae952501
Make it so gplugin.h, gplugin-native.h, and gplugin-gtk.h may not be included by the libraries they are for.

Testing Done:
Compile

Reviewed at https://reviews.imfreedom.org/r/236/
--- a/gplugin-gtk/gplugin-gtk.h.in Thu Nov 19 21:51:00 2020 -0600
+++ b/gplugin-gtk/gplugin-gtk.h.in Thu Nov 19 21:51:05 2020 -0600
@@ -17,9 +17,15 @@
#ifndef GPLUGIN_GTK_H
#define GPLUGIN_GTK_H
+#ifndef __GI_SCANNER__
+# ifdef GPLUGIN_GTK_COMPILATION
+# error "gplugin-gtk source files should not include gplugin-gtk.h"
+# endif /* GPLUGIN_GTK_COMPILATION */
+#endif /* __GI_SCANNER__ */
+
#ifndef GPLUGIN_GTK_GLOBAL_HEADER_INSIDE
-#define GPLUGIN_GTK_GLOBAL_HEADER_INSIDE
-#endif
+# define GPLUGIN_GTK_GLOBAL_HEADER_INSIDE
+#endif /* GPLUGIN_GTK_GLOBAL_HEADER_INSIDE */
@GPLUGIN_GTK_H_INCLUDES@
--- a/gplugin/gplugin-manager.c Thu Nov 19 21:51:00 2020 -0600
+++ b/gplugin/gplugin-manager.c Thu Nov 19 21:51:05 2020 -0600
@@ -21,10 +21,10 @@
#include <glib.h>
#include <glib/gi18n-lib.h>
-#include <gplugin-native.h>
#include <gplugin/gplugin-core.h>
#include <gplugin/gplugin-file-tree.h>
#include <gplugin/gplugin-manager.h>
+#include <gplugin/gplugin-native-loader.h>
#include <gplugin/gplugin-private.h>
/**
--- a/gplugin/gplugin-native.h.in Thu Nov 19 21:51:00 2020 -0600
+++ b/gplugin/gplugin-native.h.in Thu Nov 19 21:51:05 2020 -0600
@@ -14,16 +14,22 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
+
#ifndef GPLUGIN_NATIVE_H
#define GPLUGIN_NATIVE_H
+#ifndef __GI_SCANNER__
+# ifdef GPLUGIN_COMPILATION
+# error "gplugin source files should not include gplugin-native.h"
+# endif /* GPLUGIN_COMPILATION */
+#endif /* __GI_SCANNER__ */
+
#ifndef GPLUGIN_GLOBAL_HEADER_INSIDE
-#define GPLUGIN_GLOBAL_HEADER_INSIDE
-#endif
+# define GPLUGIN_GLOBAL_HEADER_INSIDE
+#endif /* GPLUGIN_GLOBAL_HEADER_INSIDE */
+
@GPLUGIN_NATIVE_H_INCLUDES@
#undef GPLUGIN_GLOBAL_HEADER_INSIDE
#endif /* GPLUGIN_NATIVE_H */
-
-
--- a/gplugin/gplugin.h.in Thu Nov 19 21:51:00 2020 -0600
+++ b/gplugin/gplugin.h.in Thu Nov 19 21:51:05 2020 -0600
@@ -14,12 +14,19 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <https://www.gnu.org/licenses/>.
*/
+
#ifndef GPLUGIN_H
#define GPLUGIN_H
+#ifndef __GI_SCANNER__
+# ifdef GPLUGIN_COMPILATION
+# error "gplugin sources should not include gplugin.h"
+# endif /* GPLUGIN_COMPILATION */
+#endif /* __GI_SCANNER__ */
+
#ifndef GPLUGIN_GLOBAL_HEADER_INSIDE
-#define GPLUGIN_GLOBAL_HEADER_INSIDE
-#endif
+# define GPLUGIN_GLOBAL_HEADER_INSIDE
+#endif /* GPLUGIN_GLOBAL_HEADER_INSIDE */
@GPLUGIN_H_INCLUDES@