[pywin32-checkins] pywin32/win32/src/win32wnet win32wnet.cpp, 1.14, 1.15
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-09 07:21:15
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32wnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/win32/src/win32wnet Modified Files: win32wnet.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: win32wnet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32wnet/win32wnet.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** win32wnet.cpp 3 Dec 2008 22:34:21 -0000 1.14 --- win32wnet.cpp 9 Dec 2008 07:21:06 -0000 1.15 *************** *** 641,659 **** }; ! extern "C" __declspec(dllexport) ! void ! initwin32wnet(void) ! { ! PyObject *dict, *module; ! module = Py_InitModule("win32wnet", win32wnet_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); ! if (!dict) return; ! PyWinGlobals_Ensure(); ! PyDict_SetItemString(dict, "error", PyWinExc_ApiError); ! PyDict_SetItemString(dict, "NETRESOURCEType", (PyObject *)&PyNETRESOURCEType); ! PyDict_SetItemString(dict, "NCBType", (PyObject *)&PyNCBType); ! Py_INCREF(PyWinExc_ApiError); } --- 641,659 ---- }; ! 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; } |