summaryrefslogtreecommitdiffstats
path: root/custom/custom.c
blob: 216511782d662fa141baa5cdd8a2a78510bfa6ff (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
 * This file is the basis of a custom Python interpreter.  Use it for Linux,
 * UNIX and Windows (console).  You will also need to edit mkcustom.py.
 */


#include <Python.h>


int main(int argc, char **argv)
{
	/*
	 * Declare the module initialisation function for each module you want
	 * to be a builtin in the custom interpreter.  The name of the function
	 * will be the name of the module with "init" prepended.  The modules
	 * must be built as static libraries (using the -k flag to configure.py
	 * for SIP-TQt and PyTQt).
	 */

	/* The sip module will be builtin. */
	extern void initsip_tqt(void);

	/*
	 * Uncomment these (and in the structure below) to include the PyTQt
	 * modules as builtins.
	 */
/*	extern void initqt(void);*/
/*	extern void initqtaxcontainer(void);*/
/*	extern void initqtcanvas(void);*/
/*	extern void initext(void);*/
/*	extern void initqtgl(void);*/
/*	extern void initqtnetwork(void);*/
/*	extern void initqtsql(void);*/
/*	extern void initqttable(void);*/
/*	extern void initqtui(void);*/
/*	extern void initqtxml(void);*/

	/*
	 * This structure specifies the names and initialisation functions of
	 * the builtin modules.
	 */
	struct _inittab builtin_modules[] = {
		{"sip_tqt", initsip_tqt},
/*		{"tqt", initqt},*/
/*		{"tqtaxcontainer", initqtaxcontainer},*/
/*		{"tqtcanvas", initqtcanvas},*/
/*		{"tqtext", initext},*/
/*		{"tqtgl", initqtgl},*/
/*		{"tqtnetwork", initqtnetwork},*/
/*		{"tqtsql", initqtsql},*/
/*		{"tqttable", initqttable},*/
/*		{"tqtui", initqtui},*/
/*		{"tqtxml", initqtxml},*/
		{NULL, NULL}
	};

	PyImport_ExtendInittab(builtin_modules);

	return Py_Main(argc, argv);
}