[pywin32-checkins] pywin32/com/win32comext/internet/src internet.cpp, 1.4, 1.4.2.1
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-08-29 08:32:50
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/internet/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11771 Modified Files: Tag: py3k internet.cpp Log Message: Changes to build for Py3k Index: internet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/internet.cpp,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** internet.cpp 22 Oct 2007 04:35:24 -0000 1.4 --- internet.cpp 29 Aug 2008 08:32:58 -0000 1.4.2.1 *************** *** 188,192 **** /* List of module functions */ // @module internet|A module, encapsulating the ActiveX Internet interfaces ! static struct PyMethodDef internet_methods[]= { { "CoInternetIsFeatureEnabled", PyCoInternetIsFeatureEnabled}, // @pymeth CoInternetIsFeatureEnabled| --- 188,192 ---- /* List of module functions */ // @module internet|A module, encapsulating the ActiveX Internet interfaces ! static struct PyMethodDef internet_functions[]= { { "CoInternetIsFeatureEnabled", PyCoInternetIsFeatureEnabled}, // @pymeth CoInternetIsFeatureEnabled| *************** *** 220,233 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) void initinternet() { ! char *modName = "internet"; ! PyObject *oModule; ! // Create the module and add the functions ! oModule = Py_InitModule(modName, internet_methods); ! if (!oModule) /* Eeek - some serious error! */ return; ! PyObject *dict = PyModule_GetDict(oModule); ! if (!dict) return; /* Another serious error!*/ // Register all of our interfaces, gateways and IIDs. --- 220,255 ---- /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initinternet(void) ! #else ! PyObject *PyInit_internet(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("internet", internet_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! static PyModuleDef internet_def = { ! PyModuleDef_HEAD_INIT, ! "internet", ! "A module, encapsulating the ActiveX Internet interfaces", ! -1, ! internet_functions ! }; ! module = PyModule_Create(&internet_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif // Register all of our interfaces, gateways and IIDs. *************** *** 279,281 **** --- 301,307 ---- // ADD_CONSTANT(); // @const internet|| + + #if (PY_VERSION_HEX >= 0x03000000) + return module; + #endif } |