blob: 814204f1aaef657c1220a03cb348cc9a51818d80 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
|
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <Python.h>
#if defined _WIN32
# define MODULE_EXPORT __declspec(dllexport)
#else
# define MODULE_EXPORT __attribute__ ((visibility("default")))
#endif
static PyMethodDef QtExampleIconsMethods[] = {
{NULL, NULL, 0, NULL}
};
static struct PyModuleDef moduleDef = {
/* m_base */ PyModuleDef_HEAD_INIT,
/* m_name */ "QtExampleIcons",
/* m_doc */ NULL,
/* m_size */ -1,
/* m_methods */ QtExampleIconsMethods,
/* m_reload */ NULL,
/* m_traverse */ NULL,
/* m_clear */ NULL,
/* m_free */ NULL
};
MODULE_EXPORT PyObject *PyInit_QtExampleIcons(void)
{
return PyModule_Create(&moduleDef);
}
int main(int argc, char *argv[])
{
#ifndef PYPY_VERSION
Py_SetProgramName(L"module-test");
Py_Initialize();
#endif
PyInit_QtExampleIcons();
return 0;
}
|