summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2019-04-01 12:06:25 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2019-04-01 12:14:45 +0800
commit68af572ba435236d1423f52a06475ea46b977446 (patch)
tree11ff898f4af0478c67255d489398188258f21ab9
parent5b5a68c5dbbcfd414cf3d3fda29a1b675c2d3c1f (diff)
downloadgtk+-68af572ba435236d1423f52a06475ea46b977446.tar.gz
test/reftests: Fix build on Visual Studio
As we are building the gtkreftestprivate and reftest test libraries as DLLs, we need to export the symbols in there so that things will link. Decorate the symbols with G_MODULE_EXPORT for this purpose.
-rw-r--r--testsuite/reftests/gtk-reftest.h2
-rw-r--r--testsuite/reftests/reftest-compare.h1
-rw-r--r--testsuite/reftests/reftest-module.h5
-rw-r--r--testsuite/reftests/reftest-snapshot.c4
-rw-r--r--testsuite/reftests/reftest-snapshot.h1
5 files changed, 11 insertions, 2 deletions
diff --git a/testsuite/reftests/gtk-reftest.h b/testsuite/reftests/gtk-reftest.h
index e4da797626..bb845e5711 100644
--- a/testsuite/reftests/gtk-reftest.h
+++ b/testsuite/reftests/gtk-reftest.h
@@ -21,7 +21,9 @@
G_BEGIN_DECLS
/* reftest-snapshot.c */
+G_MODULE_EXPORT
extern void reftest_inhibit_snapshot (void);
+G_MODULE_EXPORT
extern void reftest_uninhibit_snapshot (void);
G_END_DECLS
diff --git a/testsuite/reftests/reftest-compare.h b/testsuite/reftests/reftest-compare.h
index b889e16597..551b1c5a92 100644
--- a/testsuite/reftests/reftest-compare.h
+++ b/testsuite/reftests/reftest-compare.h
@@ -22,6 +22,7 @@
G_BEGIN_DECLS
+G_MODULE_EXPORT
cairo_surface_t * reftest_compare_surfaces (cairo_surface_t *surface1,
cairo_surface_t *surface2);
diff --git a/testsuite/reftests/reftest-module.h b/testsuite/reftests/reftest-module.h
index cd12657fc0..222b46a6d1 100644
--- a/testsuite/reftests/reftest-module.h
+++ b/testsuite/reftests/reftest-module.h
@@ -24,13 +24,18 @@ G_BEGIN_DECLS
typedef struct _ReftestModule ReftestModule;
+G_MODULE_EXPORT
ReftestModule * reftest_module_new (const char *directory,
const char *module_name);
+G_MODULE_EXPORT
ReftestModule * reftest_module_new_self (void);
+G_MODULE_EXPORT
ReftestModule * reftest_module_ref (ReftestModule *module);
+G_MODULE_EXPORT
void reftest_module_unref (ReftestModule *module);
+G_MODULE_EXPORT
GCallback reftest_module_lookup (ReftestModule *module,
const char *function_name);
diff --git a/testsuite/reftests/reftest-snapshot.c b/testsuite/reftests/reftest-snapshot.c
index 7fb467b8ae..231ff722e2 100644
--- a/testsuite/reftests/reftest-snapshot.c
+++ b/testsuite/reftests/reftest-snapshot.c
@@ -64,13 +64,13 @@ quit_when_idle (gpointer loop)
static gint inhibit_count;
static GMainLoop *loop;
-void
+G_MODULE_EXPORT void
reftest_inhibit_snapshot (void)
{
inhibit_count++;
}
-void
+G_MODULE_EXPORT void
reftest_uninhibit_snapshot (void)
{
g_assert (inhibit_count > 0);
diff --git a/testsuite/reftests/reftest-snapshot.h b/testsuite/reftests/reftest-snapshot.h
index 178d2e8469..5a24388722 100644
--- a/testsuite/reftests/reftest-snapshot.h
+++ b/testsuite/reftests/reftest-snapshot.h
@@ -22,6 +22,7 @@
G_BEGIN_DECLS
+G_MODULE_EXPORT
cairo_surface_t * reftest_snapshot_ui_file (const char *ui_file);
G_END_DECLS