[pywin32-checkins] pywin32/win32/src/win32wnet win32wnet.cpp, 1.13.2.1, 1.13.2.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-09 12:39:07
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32wnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/win32/src/win32wnet Modified Files: Tag: py3k win32wnet.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: win32wnet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32wnet/win32wnet.cpp,v retrieving revision 1.13.2.1 retrieving revision 1.13.2.2 diff -C2 -d -r1.13.2.1 -r1.13.2.2 *** win32wnet.cpp 29 Aug 2008 05:00:24 -0000 1.13.2.1 --- win32wnet.cpp 9 Dec 2008 12:38:52 -0000 1.13.2.2 *************** *** 632,682 **** }; ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initwin32wnet(void) ! #else ! PyObject *PyInit_win32wnet(void) ! #endif { ! PyObject *dict, *module; ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("win32wnet", win32wnet_functions); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; - #else - static PyModuleDef win32wnet_def = { - PyModuleDef_HEAD_INIT, - "win32wnet", - "A module that exposes the Windows Networking API.", - -1, - win32wnet_functions - }; - module = PyModule_Create(&win32wnet_def); - if (!module) - return NULL; - dict = PyModule_GetDict(module); - if (!dict) - return NULL; - #endif - PyWinGlobals_Ensure(); - Py_INCREF(PyWinExc_ApiError); PyDict_SetItemString(dict, "error", PyWinExc_ApiError); - #if (PY_VERSION_HEX >= 0x03000000) if ((PyType_Ready(&PyNETRESOURCEType) == -1) || (PyType_Ready(&PyNCBType) == -1)) ! return NULL; ! #endif PyDict_SetItemString(dict, "NETRESOURCEType", (PyObject *)&PyNETRESOURCEType); PyDict_SetItemString(dict, "NCBType", (PyObject *)&PyNCBType); ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif; } --- 632,650 ---- }; ! PYWIN_MODULE_INIT_FUNC(win32wnet) { ! PYWIN_MODULE_INIT_PREPARE(win32wnet, win32wnet_functions, ! "A module that exposes the Windows Networking API."); PyDict_SetItemString(dict, "error", PyWinExc_ApiError); if ((PyType_Ready(&PyNETRESOURCEType) == -1) || (PyType_Ready(&PyNCBType) == -1)) ! PYWIN_MODULE_INIT_RETURN_ERROR; PyDict_SetItemString(dict, "NETRESOURCEType", (PyObject *)&PyNETRESOURCEType); PyDict_SetItemString(dict, "NCBType", (PyObject *)&PyNCBType); ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |