diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 90825e2392b2d70e43c7a25b8a3752299a933894 (patch) | |
tree | e33aa27f02b74604afbfd0ea4f1cfca8833d882a /python/sip/custom/customw.c | |
download | tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.tar.gz tdebindings-90825e2392b2d70e43c7a25b8a3752299a933894.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'python/sip/custom/customw.c')
-rw-r--r-- | python/sip/custom/customw.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/python/sip/custom/customw.c b/python/sip/custom/customw.c new file mode 100644 index 00000000..58770766 --- /dev/null +++ b/python/sip/custom/customw.c @@ -0,0 +1,64 @@ +/* + * This file is the basis of a custom Python interpreter. Use it for Windows + * (non-console). You will also need to edit mkcustom.py. + */ + + +#define WIN32_LEAN_AND_MEAN +#include <windows.h> + +#include <Python.h> + + +int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, + LPSTR lpCmdLine, int nCmdShow) +{ + /* + * 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); +} |