summaryrefslogtreecommitdiffstats
path: root/custom/custom.c
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-22 02:59:34 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-11-22 02:59:34 -0600
commit6c4cc3653e8dd7668295f3e659b7eb4dc571b67c (patch)
treea559fd71fc982e35a4f984d85a5c9d92b764ae8c /custom/custom.c
downloadsip4-tqt-6c4cc3653e8dd7668295f3e659b7eb4dc571b67c.tar.gz
sip4-tqt-6c4cc3653e8dd7668295f3e659b7eb4dc571b67c.zip
Initial import of SIP4 for Qt3
Diffstat (limited to 'custom/custom.c')
-rw-r--r--custom/custom.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/custom/custom.c b/custom/custom.c
new file mode 100644
index 0000000..e5ec2d2
--- /dev/null
+++ b/custom/custom.c
@@ -0,0 +1,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 and PyQt).
+ */
+
+ /* The sip module will be builtin. */
+ extern void initsip(void);
+
+ /*
+ * Uncomment these (and in the structure below) to include the PyQt
+ * modules as builtins.
+ */
+/* extern void initqt(void);*/
+/* extern void initqtaxcontainer(void);*/
+/* extern void initqtcanvas(void);*/
+/* extern void initqtext(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", initsip},
+/* {"qt", initqt},*/
+/* {"qtaxcontainer", initqtaxcontainer},*/
+/* {"qtcanvas", initqtcanvas},*/
+/* {"qtext", initqtext},*/
+/* {"qtgl", initqtgl},*/
+/* {"qtnetwork", initqtnetwork},*/
+/* {"qtsql", initqtsql},*/
+/* {"qttable", initqttable},*/
+/* {"qtui", initqtui},*/
+/* {"qtxml", initqtxml},*/
+ {NULL, NULL}
+ };
+
+ PyImport_ExtendInittab(builtin_modules);
+
+ return Py_Main(argc, argv);
+}