[pywin32-checkins] pywin32/win32/src/PerfMon PyPerfMon.cpp, 1.2.4.2, 1.2.4.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-09 12:39:04
|
Update of /cvsroot/pywin32/pywin32/win32/src/PerfMon In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/win32/src/PerfMon Modified Files: Tag: py3k PyPerfMon.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: PyPerfMon.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PerfMon/PyPerfMon.cpp,v retrieving revision 1.2.4.2 retrieving revision 1.2.4.3 diff -C2 -d -r1.2.4.2 -r1.2.4.3 *** PyPerfMon.cpp 5 Sep 2008 20:35:24 -0000 1.2.4.2 --- PyPerfMon.cpp 9 Dec 2008 12:38:52 -0000 1.2.4.3 *************** *** 97,141 **** ! ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initperfmon(void) ! { ! PyObject *dict, *module; ! module = Py_InitModule("perfmon", perfmon_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! ! if (PyType_Ready(&PyPerfMonManager::type) == -1 ! || PyType_Ready(&PyPERF_COUNTER_DEFINITION::type) == -1 ! || PyType_Ready(&PyPERF_OBJECT_TYPE::type) == -1) ! return; ! } ! ! #else ! PyObject *PyInit_perfmon(void) { ! PyObject *dict, *module; ! static PyModuleDef permon_def = { ! PyModuleDef_HEAD_INIT, ! "perfmon", ! "Contains functions and objects wrapping the Performance Monitor APIs", ! -1, ! perfmon_functions ! }; ! module = PyModule_Create(&permon_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; if (PyType_Ready(&PyPerfMonManager::type) == -1 || PyType_Ready(&PyPERF_COUNTER_DEFINITION::type) == -1 || PyType_Ready(&PyPERF_OBJECT_TYPE::type) == -1) ! return NULL; ! return module; } - #endif --- 97,109 ---- ! PYWIN_MODULE_INIT_FUNC(perfmon) { ! PYWIN_MODULE_INIT_PREPARE(perfmon, perfmon_functions, ! "Contains functions and objects wrapping the Performance Monitor APIs"); if (PyType_Ready(&PyPerfMonManager::type) == -1 || PyType_Ready(&PyPERF_COUNTER_DEFINITION::type) == -1 || PyType_Ready(&PyPERF_OBJECT_TYPE::type) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |