[libpeas/msvc: 5/12] libpeas: Add a header to decorate public symbols for export
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas/msvc: 5/12] libpeas: Add a header to decorate public symbols for export
- Date: Mon, 15 Oct 2018 09:41:26 +0000 (UTC)
commit 00692dc4a711a8698c91c212b95ea2d45461f846
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Oct 15 12:58:21 2018 +0800
libpeas: Add a header to decorate public symbols for export
Decorate all public symbols with _PEAS_EXTERN, which is defined to
nothing as default, so that we can export the symbols using compiler
directives by re-defining _PEAS_EXTERN during the compilation process.
libpeas/peas-macros.h | 41 +++++++++++++++++++++++++++++++++++++++++
libpeas/peas-sources.mak | 1 +
2 files changed, 42 insertions(+)
---
diff --git a/libpeas/peas-macros.h b/libpeas/peas-macros.h
new file mode 100644
index 0000000..2921c0f
--- /dev/null
+++ b/libpeas/peas-macros.h
@@ -0,0 +1,41 @@
+/*
+ * peas-macros.h
+ * This file is part of libpeas, based on GLib's gmacros.h and gversionmacros.h.
+ *
+ * libpeas is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * libpeas is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+#ifndef __PEAS_MACROS_H__
+#define __PEAS_MACROS_H__
+
+#include <glib.h>
+
+#ifndef _PEAS_EXTERN
+#define _PEAS_EXTERN
+#endif
+
+#ifdef PEAS_DISABLE_DEPRECATION_WARNINGS
+#define PEAS_DEPRECATED _PEAS_EXTERN
+#define PEAS_DEPRECATED_FOR(f) _PEAS_EXTERN
+#define PEAS_UNAVAILABLE(maj,min) _PEAS_EXTERN
+#else
+#define PEAS_DEPRECATED G_DEPRECATED _PEAS_EXTERN
+#define PEAS_DEPRECATED_FOR(f) G_DEPRECATED(f) _PEAS_EXTERN
+#define PEAS_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _PEAS_EXTERN
+#endif
+
+#define PEAS_API _PEAS_EXTERN
+
+#endif /* __PEAS_MACROS_H__ */
\ No newline at end of file
diff --git a/libpeas/peas-sources.mak b/libpeas/peas-sources.mak
index f836c91..b243a10 100644
--- a/libpeas/peas-sources.mak
+++ b/libpeas/peas-sources.mak
@@ -1,5 +1,6 @@
PEAS_PUBLIC_HEADERS = \
peas-autocleanups.h \
+ peas-macros.h \
peas-plugin-info.h \
peas-object-module.h \
peas-extension-base.h \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]