Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11284/com/win32comext/shell/src
Modified Files:
shell.cpp
Log Message:
py3k friendly: PYWIN_MODULE_* macros to help with module's init etc.
Index: shell.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -d -r1.72 -r1.73
*** shell.cpp 3 Dec 2008 10:02:28 -0000 1.72
--- shell.cpp 8 Dec 2008 13:16:37 -0000 1.73
***************
*** 3326,3339 ****
/* Module initialisation */
! extern "C" __declspec(dllexport) void initshell()
{
! char *modName = "shell";
! PyObject *oModule;
! // Create the module and add the functions
! oModule = Py_InitModule(modName, shell_methods);
! if (!oModule) /* Eeek - some serious error! */
! return;
! PyObject *dict = PyModule_GetDict(oModule);
! if (!dict) return; /* Another serious error!*/
PyDict_SetItemString(dict, "error", PyWinExc_COMError);
--- 3326,3333 ----
/* Module initialisation */
! PYWIN_MODULE_INIT_FUNC(shell)
{
! PYWIN_MODULE_INIT_PREPARE(shell, shell_methods,
! "A module wrapping Windows Shell functions and interfaces");
PyDict_SetItemString(dict, "error", PyWinExc_COMError);
***************
*** 3498,3500 ****
--- 3492,3496 ----
# pragma message("Please update your SDK headers - IE5 features missing!")
#endif
+
+ PYWIN_MODULE_INIT_RETURN_SUCCESS;
}
|