summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qpluginloader/lib/mylib.c
blob: 3f1fe03114ec83f4aeb9e1d8821640eb88360a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#include <qglobal.h>

#if defined(Q_CC_MSVC) || defined(Q_CC_MSVC_NET) || defined(Q_CC_BOR)
#define LIB_EXPORT __declspec(dllexport)
#else
#define LIB_EXPORT
#endif

#if defined(Q_CC_BOR)
# define BORLAND_STDCALL __stdcall
#else
# define BORLAND_STDCALL
#endif

static int pluginVariable = 0xc0ffee;
LIB_EXPORT int *pointerAddress()
{
    return &pluginVariable;
}

LIB_EXPORT int BORLAND_STDCALL version()
{
    return 1;
}