Update of /cvsroot/pywin32/pywin32/win32/src/win32net
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/win32/src/win32net
Modified Files:
Tag: py3k
win32netmodule.cpp
Log Message:
Merge more PYWIN32_MODULE_* macro usage from the trunk
Index: win32netmodule.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v
retrieving revision 1.26.2.1
retrieving revision 1.26.2.2
diff -C2 -d -r1.26.2.1 -r1.26.2.2
*** win32netmodule.cpp 29 Aug 2008 05:00:24 -0000 1.26.2.1
--- win32netmodule.cpp 9 Dec 2008 12:38:52 -0000 1.26.2.2
***************
*** 1159,1194 ****
}
! extern "C" __declspec(dllexport)
! #if (PY_VERSION_HEX < 0x03000000)
! void initwin32net(void)
! #else
! PyObject *PyInit_win32net(void)
! #endif
{
! PyObject *module, *dict;
! PyWinGlobals_Ensure();
!
! #if (PY_VERSION_HEX < 0x03000000)
! module = Py_InitModule("win32net", win32net_functions);
! if (!module)
! return;
! dict = PyModule_GetDict(module);
! if (!dict)
! return;
! #else
! static PyModuleDef win32net_def = {
! PyModuleDef_HEAD_INIT,
! "win32net",
! "A module encapsulating the Windows Network API.",
! -1,
! win32net_functions
! };
! module = PyModule_Create(&win32net_def);
! if (!module)
! return NULL;
! dict = PyModule_GetDict(module);
! if (!dict)
! return NULL;
! #endif
PyDict_SetItemString(dict, "error", PyWinExc_ApiError);
--- 1159,1166 ----
}
! PYWIN_MODULE_INIT_FUNC(win32net)
{
! PYWIN_MODULE_INIT_PREPARE(win32net, win32net_functions,
! "A module encapsulating the Windows Network API.");
PyDict_SetItemString(dict, "error", PyWinExc_ApiError);
***************
*** 1215,1221 ****
}
#endif
!
! #if (PY_VERSION_HEX >= 0x03000000)
! return module;
! #endif
}
--- 1187,1190 ----
}
#endif
! PYWIN_MODULE_INIT_RETURN_SUCCESS;
}
|