Skip to content

Commit

Permalink
reftests: Fix building on Visual Studio
Browse files Browse the repository at this point in the history
We need to mark the prototypes in the headers so that they get exported
properly from the reftest DLLs that we build, so that the reftest DLLs
and program will link properly.  Include gtk-reftest.h in
reftest-snapshot.c so that the compiler picks up the export directives
as needed.
  • Loading branch information
fanc999-1 committed Nov 22, 2019
1 parent 1a87249 commit 36edb5f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions testsuite/reftests/gtk-reftest.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
G_BEGIN_DECLS

/* reftest-snapshot.c */
G_MODULE_EXPORT
void reftest_inhibit_snapshot (void);

G_MODULE_EXPORT
void reftest_uninhibit_snapshot (void);

G_END_DECLS
Expand Down
1 change: 1 addition & 0 deletions testsuite/reftests/reftest-compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

G_BEGIN_DECLS

G_MODULE_EXPORT
cairo_surface_t * reftest_compare_surfaces (cairo_surface_t *surface1,
cairo_surface_t *surface2);

Expand Down
6 changes: 6 additions & 0 deletions testsuite/reftests/reftest-module.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,19 @@ 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);

Expand Down
1 change: 1 addition & 0 deletions testsuite/reftests/reftest-snapshot.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "reftest-snapshot.h"

#include "reftest-module.h"
#include "gtk-reftest.h"

#include <string.h>

Expand Down
1 change: 1 addition & 0 deletions testsuite/reftests/reftest-snapshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

G_BEGIN_DECLS

G_MODULE_EXPORT
cairo_surface_t * reftest_snapshot_ui_file (const char *ui_file);

G_END_DECLS
Expand Down

0 comments on commit 36edb5f

Please sign in to comment.