ยปCore Development>Code coverage>Modules/_testimportmultiple.c

Python code coverage for Modules/_testimportmultiple.c

#countcontent
1n/a/*
2n/a * C extensions module to test importing multiple modules from one compiled
3n/a * file (issue16421). This file defines 3 modules (_testimportmodule,
4n/a * foo, bar), only the first one is called the same as the compiled file.
5n/a */
6n/a#include<Python.h>
7n/a
8n/astatic struct PyModuleDef _testimportmultiple = {
9n/a PyModuleDef_HEAD_INIT,
10n/a "_testimportmultiple",
11n/a "_testimportmultiple doc",
12n/a -1,
13n/a NULL,
14n/a NULL,
15n/a NULL,
16n/a NULL,
17n/a NULL
18n/a};
19n/a
20n/aPyMODINIT_FUNC PyInit__testimportmultiple(void)
21n/a{
22n/a return PyModule_Create(&_testimportmultiple);
23n/a}
24n/a
25n/astatic struct PyModuleDef _foomodule = {
26n/a PyModuleDef_HEAD_INIT,
27n/a "_testimportmultiple_foo",
28n/a "_testimportmultiple_foo doc",
29n/a -1,
30n/a NULL,
31n/a NULL,
32n/a NULL,
33n/a NULL,
34n/a NULL
35n/a};
36n/a
37n/aPyMODINIT_FUNC PyInit__testimportmultiple_foo(void)
38n/a{
39n/a return PyModule_Create(&_foomodule);
40n/a}
41n/a
42n/astatic struct PyModuleDef _barmodule = {
43n/a PyModuleDef_HEAD_INIT,
44n/a "_testimportmultiple_bar",
45n/a "_testimportmultiple_bar doc",
46n/a -1,
47n/a NULL,
48n/a NULL,
49n/a NULL,
50n/a NULL,
51n/a NULL
52n/a};
53n/a
54n/aPyMODINIT_FUNC PyInit__testimportmultiple_bar(void){
55n/a return PyModule_Create(&_barmodule);
56n/a}
57n/a