pywin32-checkins Mailing List for Python for Windows Extensions (Page 39)
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(6) |
Jul
(50) |
Aug
(11) |
Sep
(24) |
Oct
(184) |
Nov
(118) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(31) |
Feb
(25) |
Mar
(34) |
Apr
(105) |
May
(49) |
Jun
(38) |
Jul
(39) |
Aug
(7) |
Sep
(98) |
Oct
(79) |
Nov
(20) |
Dec
(17) |
2005 |
Jan
(66) |
Feb
(32) |
Mar
(43) |
Apr
(30) |
May
(58) |
Jun
(30) |
Jul
(16) |
Aug
(4) |
Sep
(21) |
Oct
(42) |
Nov
(11) |
Dec
(14) |
2006 |
Jan
(42) |
Feb
(30) |
Mar
(22) |
Apr
(1) |
May
(9) |
Jun
(15) |
Jul
(20) |
Aug
(9) |
Sep
(8) |
Oct
(1) |
Nov
(9) |
Dec
(43) |
2007 |
Jan
(52) |
Feb
(45) |
Mar
(20) |
Apr
(12) |
May
(59) |
Jun
(39) |
Jul
(35) |
Aug
(31) |
Sep
(17) |
Oct
(20) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(28) |
Feb
(111) |
Mar
(4) |
Apr
(27) |
May
(40) |
Jun
(27) |
Jul
(32) |
Aug
(94) |
Sep
(87) |
Oct
(153) |
Nov
(336) |
Dec
(331) |
2009 |
Jan
(298) |
Feb
(127) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(10) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
|
Dec
(1) |
2010 |
Jan
(7) |
Feb
(1) |
Mar
|
Apr
|
May
(15) |
Jun
(4) |
Jul
(3) |
Aug
(28) |
Sep
(1) |
Oct
(19) |
Nov
(16) |
Dec
(6) |
2011 |
Jan
(2) |
Feb
(18) |
Mar
(17) |
Apr
(12) |
May
(5) |
Jun
(11) |
Jul
(7) |
Aug
(2) |
Sep
(2) |
Oct
(4) |
Nov
(4) |
Dec
|
2012 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(8) |
May
(4) |
Jun
(3) |
Jul
(13) |
Aug
(27) |
Sep
(8) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
2013 |
Jan
|
Feb
(1) |
Mar
(5) |
Apr
(10) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(9) |
2014 |
Jan
(2) |
Feb
(4) |
Mar
(4) |
Apr
(1) |
May
(4) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
(1) |
2015 |
Jan
(1) |
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(3) |
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Mark H. <mha...@us...> - 2008-12-09 12:39:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/shell/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/shell/src Modified Files: Tag: py3k shell.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: shell.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/shell/src/shell.cpp,v retrieving revision 1.68.2.5 retrieving revision 1.68.2.6 diff -C2 -d -r1.68.2.5 -r1.68.2.6 *** shell.cpp 4 Dec 2008 00:07:22 -0000 1.68.2.5 --- shell.cpp 9 Dec 2008 12:38:52 -0000 1.68.2.6 *************** *** 3326,3363 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initshell(void) ! #else ! PyObject *PyInit_shell(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule("shell", shell_methods); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! #define RETURN_ERROR return NULL; ! static PyModuleDef shell_def = { ! PyModuleDef_HEAD_INIT, ! "shell", ! "A module wrapping Windows Shell functions and interfaces", ! -1, ! shell_methods ! }; ! module = PyModule_Create(&shell_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif 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); *************** *** 3523,3528 **** #endif ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 3493,3496 ---- #endif ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:06
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/propsys/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/propsys/src Modified Files: Tag: py3k propsys.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: propsys.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/propsys/src/propsys.cpp,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -C2 -d -r1.1.2.1 -r1.1.2.2 *** propsys.cpp 17 Sep 2008 08:40:55 -0000 1.1.2.1 --- propsys.cpp 9 Dec 2008 12:38:52 -0000 1.1.2.2 *************** *** 74,116 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initpropsys(void) ! #else ! PyObject *PyInit_propsys(void) ! #endif { ! PyObject *dict, *module; ! ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule("propsys", propsys_methods); ! ! #else ! #define RETURN_ERROR return NULL; ! static PyModuleDef propsys_def = { ! PyModuleDef_HEAD_INIT, ! "propsys", ! "A module, encapsulating the Vista Property System interfaces", ! -1, ! propsys_methods ! }; ! module = PyModule_Create(&propsys_def); ! #endif ! ! if (!module) ! RETURN_ERROR; ! dict = PyModule_GetDict(module); ! if (!dict) ! RETURN_ERROR; if (PyDict_SetItemString(dict, "error", PyWinExc_COMError) == -1) ! RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. //PyCom_RegisterExtensionSupport(dict, g_interfaceSupportData, sizeof(g_interfaceSupportData)/sizeof(PyCom_InterfaceSupportInfo)); ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 74,88 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(propsys) { ! PYWIN_MODULE_INIT_PREPARE(propsys, propsys_methods, ! "A module, encapsulating the Vista Property System interfaces"); if (PyDict_SetItemString(dict, "error", PyWinExc_COMError) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. //PyCom_RegisterExtensionSupport(dict, g_interfaceSupportData, sizeof(g_interfaceSupportData)/sizeof(PyCom_InterfaceSupportInfo)); ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
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; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:04
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/internet/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/internet/src Modified Files: Tag: py3k internet.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: internet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/internet.cpp,v retrieving revision 1.4.2.3 retrieving revision 1.4.2.4 diff -C2 -d -r1.4.2.3 -r1.4.2.4 *** internet.cpp 2 Nov 2008 13:00:38 -0000 1.4.2.3 --- internet.cpp 9 Dec 2008 12:38:52 -0000 1.4.2.4 *************** *** 257,292 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initinternet(void) ! #else ! PyObject *PyInit_internet(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("internet", internet_functions); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! static PyModuleDef internet_def = { ! PyModuleDef_HEAD_INIT, ! "internet", ! "A module, encapsulating the ActiveX Internet interfaces", ! -1, ! internet_functions ! }; ! module = PyModule_Create(&internet_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif // Register all of our interfaces, gateways and IIDs. --- 257,264 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(internet) { ! PYWIN_MODULE_INIT_PREPARE(internet, internet_functions, ! "A module, encapsulating the ActiveX Internet interfaces"); // Register all of our interfaces, gateways and IIDs. *************** *** 340,345 **** // ADD_CONSTANT(); // @const internet|| ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 312,315 ---- // ADD_CONSTANT(); // @const internet|| ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:04
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/ifilter/src Modified Files: Tag: py3k PyIFilter.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: PyIFilter.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src/PyIFilter.cpp,v retrieving revision 1.6.4.2 retrieving revision 1.6.4.3 diff -C2 -d -r1.6.4.2 -r1.6.4.3 *** PyIFilter.cpp 13 Sep 2008 16:21:29 -0000 1.6.4.2 --- PyIFilter.cpp 9 Dec 2008 12:38:52 -0000 1.6.4.3 *************** *** 280,285 **** } ! #define ADD_CONSTANT(tok) AddConstant(dict, #tok, tok) ! #define ADD_IID(tok) AddIID(dict, #tok, tok) // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering --- 280,285 ---- } ! #define ADD_CONSTANT(tok) if (0 != AddConstant(dict, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR ! #define ADD_IID(tok) if (0 != AddIID(dict, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering *************** *** 315,351 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initifilter(void) ! #else ! PyObject *PyInit_ifilter(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("ifilter", ifilter_functions); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! ! static PyModuleDef ifilter_def = { ! PyModuleDef_HEAD_INIT, ! "ifilter", ! "Wraps the interfaces used with Indexing Service filtering", ! -1, ! ifilter_functions ! }; ! module = PyModule_Create(&ifilter_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif // Register all of our interfaces, gateways and IIDs. --- 315,322 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(ifilter) { ! PYWIN_MODULE_INIT_PREPARE(ifilter, ifilter_functions, ! "Wraps the interfaces used with Indexing Service filtering"); // Register all of our interfaces, gateways and IIDs. *************** *** 401,406 **** // NOTE: New constants should go in ifiltercon.py ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 372,375 ---- // NOTE: New constants should go in ifiltercon.py ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:03
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/authorization/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/authorization/src Modified Files: Tag: py3k authorization.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: authorization.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/authorization/src/authorization.cpp,v retrieving revision 1.2.4.1 retrieving revision 1.2.4.2 diff -C2 -d -r1.2.4.1 -r1.2.4.2 *** authorization.cpp 29 Aug 2008 08:32:21 -0000 1.2.4.1 --- authorization.cpp 9 Dec 2008 12:38:51 -0000 1.2.4.2 *************** *** 48,88 **** ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initauthorization(void) ! #else ! PyObject *PyInit_authorization(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("authorization", authorization_methods); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! static PyModuleDef authorization_def = { ! PyModuleDef_HEAD_INIT, ! "authorization", ! "Module containing support for authorization COM interfaces.", ! -1, ! authorization_methods ! }; ! module = PyModule_Create(&authorization_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif ! ! PyCom_RegisterExtensionSupport(dict, interface_info, sizeof(interface_info)/sizeof(PyCom_InterfaceSupportInfo)); ! ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 48,56 ---- ! PYWIN_MODULE_INIT_FUNC(authorization) { ! PYWIN_MODULE_INIT_PREPARE(authorization, authorization_methods, ! "Module containing support for authorization COM interfaces."); ! PyCom_RegisterExtensionSupport(dict, interface_info, sizeof(interface_info)/sizeof(PyCom_InterfaceSupportInfo)); ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:03
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/axdebug/src Modified Files: Tag: py3k AXDebug.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: AXDebug.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axdebug/src/AXDebug.cpp,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -C2 -d -r1.4.4.1 -r1.4.4.2 *** AXDebug.cpp 14 Sep 2008 03:34:45 -0000 1.4.4.1 --- AXDebug.cpp 9 Dec 2008 12:38:52 -0000 1.4.4.2 *************** *** 283,315 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initaxdebug(void) ! #else ! PyObject *PyInit_axdebug(void) ! #endif { ! PyObject *module, *dict; ! ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule("axdebug", axdebug_methods); ! #else ! #define RETURN_ERROR return NULL; ! static PyModuleDef axdebug_def = { ! PyModuleDef_HEAD_INIT, ! "axdebug", ! "A module, encapsulating the ActiveX Debugging interfaces", ! -1, ! axdebug_methods ! }; ! module = PyModule_Create(&axdebug_def); ! #endif ! ! if (!module) ! RETURN_ERROR; ! dict = PyModule_GetDict(module); ! if (!dict) ! RETURN_ERROR; PyEval_InitThreads(); --- 283,290 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(axdebug) { ! PYWIN_MODULE_INIT_PREPARE(axdebug, axdebug_methods, ! "A module, encapsulating the ActiveX Debugging interfaces"); PyEval_InitThreads(); *************** *** 404,409 **** ADD_CONSTANT(TEXT_DOC_ATTR_READONLY); // @const axdebug|TEXT_DOC_ATTR_READONLY|Indicates that the document is read-only. ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 379,382 ---- ADD_CONSTANT(TEXT_DOC_ATTR_READONLY); // @const axdebug|TEXT_DOC_ATTR_READONLY|Indicates that the document is read-only. ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:03
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axscript/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/axscript/src Modified Files: Tag: py3k AXScript.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: AXScript.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axscript/src/AXScript.cpp,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** AXScript.cpp 14 Sep 2008 06:02:56 -0000 1.3.4.1 --- AXScript.cpp 9 Dec 2008 12:38:52 -0000 1.3.4.2 *************** *** 141,175 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initaxscript(void) ! #else ! PyObject *PyInit_axscript(void) ! #endif { ! PyObject *dict, *module; ! char *modName = "axscript"; ! // Create the module and add the functions ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule(modName, axcom_methods); ! ! #else ! #define RETURN_ERROR return NULL; ! static PyModuleDef axscript_def = { ! PyModuleDef_HEAD_INIT, ! "axscript", ! "A module, encapsulating the ActiveX Scripting interfaces.", ! -1, ! axcom_methods ! }; ! module = PyModule_Create(&axscript_def); ! #endif ! ! if (!module) /* Eeek - some serious error! */ ! RETURN_ERROR; ! dict = PyModule_GetDict(module); ! if (!dict) /* Another serious error!*/ ! RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. --- 141,148 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(axscript) { ! PYWIN_MODULE_INIT_PREPARE(axscript, axcom_methods, ! "A module, encapsulating the ActiveX Scripting interfaces."); // Register all of our interfaces, gateways and IIDs. *************** *** 233,238 **** #endif ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 206,209 ---- #endif ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:01
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/taskscheduler/src Modified Files: Tag: py3k taskscheduler.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: taskscheduler.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src/taskscheduler.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 *** taskscheduler.cpp 7 Sep 2008 04:12:25 -0000 1.2.4.2 --- taskscheduler.cpp 9 Dec 2008 12:38:52 -0000 1.2.4.3 *************** *** 25,65 **** }; ! ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void inittaskscheduler(void) ! #else ! PyObject *PyInit_taskscheduler(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule("taskscheduler", taskscheduler_methods); ! #else ! #define RETURN_ERROR return NULL; ! static PyModuleDef taskscheduler_def = { ! PyModuleDef_HEAD_INIT, ! "taskscheduler", ! "Supports the Scheduled Tasks COM interfaces", ! -1, ! taskscheduler_methods ! }; ! module = PyModule_Create(&taskscheduler_def); ! #endif - if (!module) - RETURN_ERROR; - dict = PyModule_GetDict(module); - if (!dict) - RETURN_ERROR; if (PyType_Ready(&PyTASK_TRIGGERType) == -1) ! RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); ! // trigger types PyModule_AddIntConstant(module,"TASK_TIME_TRIGGER_ONCE", TASK_TIME_TRIGGER_ONCE); --- 25,39 ---- }; ! PYWIN_MODULE_INIT_FUNC(taskscheduler) { ! PYWIN_MODULE_INIT_PREPARE(taskscheduler, taskscheduler_methods, ! "Supports the Scheduled Tasks COM interfaces"); if (PyType_Ready(&PyTASK_TRIGGERType) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); ! // trigger types PyModule_AddIntConstant(module,"TASK_TIME_TRIGGER_ONCE", TASK_TIME_TRIGGER_ONCE); *************** *** 157,162 **** PyModule_AddIntConstant(module,"TASKPAGE_SETTINGS", TASKPAGE_SETTINGS); ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 131,134 ---- PyModule_AddIntConstant(module,"TASKPAGE_SETTINGS", TASKPAGE_SETTINGS); ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:39:01
|
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; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:38:58
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/Pythonwin Modified Files: Tag: py3k ddemodule.cpp win32uimodule.cpp win32uiole.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: win32uiole.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiole.cpp,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** win32uiole.cpp 13 Nov 2008 05:02:23 -0000 1.8.2.2 --- win32uiole.cpp 9 Dec 2008 12:38:51 -0000 1.8.2.3 *************** *** 188,225 **** } ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initwin32uiole(void) ! #else ! PyObject *PyInit_win32uiole(void) ! #endif { ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule("win32uiole", win32uiole_functions); ! #else ! ! #define RETURN_ERROR return NULL; ! static PyModuleDef win32uiole_def = { ! PyModuleDef_HEAD_INIT, ! "win32uiole", ! "A module, encapsulating the Microsoft Foundation Classes OLE functionality.", ! -1, ! win32uiole_functions ! }; ! module = PyModule_Create(&win32uiole_def); ! #endif; ! ! if (!module) ! RETURN_ERROR; ! dict = PyModule_GetDict(module); ! if (!dict) ! RETURN_ERROR; if (AddConstants(module)) ! RETURN_ERROR; if (PyType_Ready(&PyCCommonDialog::type) == - 1 || --- 188,198 ---- } ! PYWIN_MODULE_INIT_FUNC(win32uiole) { ! PYWIN_MODULE_INIT_PREPARE(win32uiole, win32uiole_functions, ! "A module, encapsulating the Microsoft Foundation Classes OLE functionality."); if (AddConstants(module)) ! PYWIN_MODULE_INIT_RETURN_ERROR; if (PyType_Ready(&PyCCommonDialog::type) == - 1 || *************** *** 228,235 **** PyType_Ready(&PyCOleDocument::type) == -1 || PyType_Ready(&PyCOleClientItem::type) == -1) ! RETURN_ERROR; ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 201,206 ---- PyType_Ready(&PyCOleDocument::type) == -1 || PyType_Ready(&PyCOleClientItem::type) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } Index: ddemodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/ddemodule.cpp,v retrieving revision 1.1.4.1 retrieving revision 1.1.4.2 diff -C2 -d -r1.1.4.1 -r1.1.4.2 *** ddemodule.cpp 29 Aug 2008 05:53:28 -0000 1.1.4.1 --- ddemodule.cpp 9 Dec 2008 12:38:51 -0000 1.1.4.2 *************** *** 161,211 **** ! #if (PY_VERSION_HEX < 0x03000000) ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok)) return; ! #else ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok)) return NULL; ! #endif ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initdde(void) ! #else ! PyObject *PyInit_dde(void) ! #endif { if (AfxGetApp()==NULL) { PyErr_SetString(PyExc_ImportError, "This must be an MFC application - try loading win32ui first"); ! #if (PY_VERSION_HEX < 0x03000000) ! return; ! #else ! return NULL; ! #endif } ! ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("dde", dde_functions); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! static PyModuleDef dde_def = { ! PyModuleDef_HEAD_INIT, ! "dde", ! "A module for Dynamic Data Exchange support", ! -1, ! dde_functions ! }; ! module = PyModule_Create(&dde_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif dde_module_error = PyErr_NewException("dde.error", NULL, NULL); --- 161,174 ---- ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR; ! PYWIN_MODULE_INIT_FUNC(dde) { if (AfxGetApp()==NULL) { PyErr_SetString(PyExc_ImportError, "This must be an MFC application - try loading win32ui first"); ! PYWIN_MODULE_INIT_RETURN_ERROR; } ! PYWIN_MODULE_INIT_PREPARE(dde, dde_functions, ! "A module for Dynamic Data Exchange support"); dde_module_error = PyErr_NewException("dde.error", NULL, NULL); *************** *** 236,241 **** ADD_CONSTANT(MF_SENDMSGS); // Notifies the callback function whenever the system or an application sends a DDE message. ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 199,202 ---- ADD_CONSTANT(MF_SENDMSGS); // Notifies the callback function whenever the system or an application sends a DDE message. ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.39.2.8 retrieving revision 1.39.2.9 diff -C2 -d -r1.39.2.8 -r1.39.2.9 *** win32uimodule.cpp 6 Dec 2008 01:48:26 -0000 1.39.2.8 --- win32uimodule.cpp 9 Dec 2008 12:38:51 -0000 1.39.2.9 *************** *** 47,52 **** extern DWORD DebuggerThreadFunc( LPDWORD lpdwWhatever ); - static char BASED_CODE uiModName[] = "win32ui"; - // We can't init exceptionHandler in initwin32ui because the application using // us could have called SetExceptionHandler earlier. We do a forward declaration --- 47,50 ---- *************** *** 2249,2312 **** return 0; } ! extern bool CheckGoodWinApp(); extern HINSTANCE hWin32uiDll; // Handle to this DLL, from dllmain.cpp /* Initialize this module. */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initwin32ui(void) ! #else ! PyObject *PyInit_win32ui(void) ! #endif { ! // XXX - hack alert! ! // Win9x manages to wind up in here twice when used from a console - ! // CheckGoodWinApp() winds up re-initializing - so when we return ! // we see if we already did init, and get out. ! // Would be nice to solve this properly, but Win9x is a bitch to debug :( ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! #define RETURN_MODULE return; ! #else ! #define RETURN_ERROR return NULL; ! #define RETURN_MODULE return module; ! #endif; ! ! static bool bInitialized = false; ! static PyObject *dict, *module; ! if (!CheckGoodWinApp()) { ! PyErr_SetString(PyExc_RuntimeError, "The win32ui module could not initialize the application object."); ! RETURN_ERROR; ! } ! if (bInitialized) ! RETURN_MODULE; ! ! if (PyWinGlobals_Ensure() == -1) ! RETURN_ERROR; ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule(uiModName, ui_functions); #else ! ! static PyModuleDef win32ui_def = { ! PyModuleDef_HEAD_INIT, ! uiModName, ! "A module, encapsulating the Microsoft Foundation Classes.", ! -1, ! ui_functions ! }; ! module = PyModule_Create(&win32ui_def); #endif ! if (!module) ! RETURN_ERROR; ! dict = PyModule_GetDict(module); ! if (!dict) ! RETURN_ERROR; ui_module_error = PyErr_NewException("win32ui.error", NULL, NULL); if ((ui_module_error == NULL) || PyDict_SetItemString(dict, "error", ui_module_error) == -1) ! RETURN_ERROR; // drop email addy - too many ppl use it for support requests for other --- 2247,2278 ---- return 0; } ! extern bool CheckGoodWinApp(); extern HINSTANCE hWin32uiDll; // Handle to this DLL, from dllmain.cpp /* Initialize this module. */ ! PYWIN_MODULE_INIT_FUNC(win32ui) { ! // For various hysterical reasons, Win32uiApplicationInit also calls ! // initwin32ui, meaning we need to deal with being called multiple ! // times. ! static PyObject *existing_module = NULL; ! if (!CheckGoodWinApp()) { ! PyErr_SetString(PyExc_RuntimeError, "The win32ui module could not initialize the application object."); ! PYWIN_MODULE_INIT_RETURN_ERROR; ! } ! if (existing_module) #if (PY_VERSION_HEX < 0x03000000) ! return; #else ! return existing_module; #endif ! PYWIN_MODULE_INIT_PREPARE(win32ui, ui_functions, ! "A module, encapsulating the Microsoft Foundation Classes."); ui_module_error = PyErr_NewException("win32ui.error", NULL, NULL); if ((ui_module_error == NULL) || PyDict_SetItemString(dict, "error", ui_module_error) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; // drop email addy - too many ppl use it for support requests for other *************** *** 2314,2318 **** PyObject *copyright = PyWinCoreString_FromString("Copyright 1994-2008 Mark Hammond"); if ((copyright == NULL) || PyDict_SetItemString(dict, "copyright", copyright) == -1) ! RETURN_ERROR; Py_XDECREF(copyright); --- 2280,2284 ---- PyObject *copyright = PyWinCoreString_FromString("Copyright 1994-2008 Mark Hammond"); if ((copyright == NULL) || PyDict_SetItemString(dict, "copyright", copyright) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; Py_XDECREF(copyright); *************** *** 2331,2335 **** HookWindowsMessages(); // need to be notified of certain events... if (AddConstants(module) == -1) ! RETURN_ERROR; // Add all the types. --- 2297,2301 ---- HookWindowsMessages(); // need to be notified of certain events... if (AddConstants(module) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; // Add all the types. *************** *** 2341,2354 **** ui_type_CObject::typemap->GetNextAssoc(pos, pRT, pT); ! #if (PY_VERSION_HEX < 0x03000000) ! PyObject *typeName = PyString_FromString(pT->tp_name); ! #else ! PyObject *typeName = PyUnicodeObject_FromString(pT->tp_name); ! #endif // PyType_Ready sets tp_mro for inheritance to work, so it *must* be called on the type objects now. if ((typeName==NULL) ||(PyWinType_Ready(pT)==-1) ||(PyDict_SetItem(typeDict, typeName, (PyObject *)pT)==-1)) ! RETURN_ERROR; Py_XDECREF(typeName); } --- 2307,2316 ---- ui_type_CObject::typemap->GetNextAssoc(pos, pRT, pT); ! PyObject *typeName = PyWinCoreString_FromString(pT->tp_name); // PyType_Ready sets tp_mro for inheritance to work, so it *must* be called on the type objects now. if ((typeName==NULL) ||(PyWinType_Ready(pT)==-1) ||(PyDict_SetItem(typeDict, typeName, (PyObject *)pT)==-1)) ! PYWIN_MODULE_INIT_RETURN_ERROR; Py_XDECREF(typeName); } *************** *** 2356,2364 **** PyDict_SetItemString(dict, "types", typeDict); Py_XDECREF(typeDict); ! bInitialized = true; ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 2318,2324 ---- PyDict_SetItemString(dict, "types", typeDict); Py_XDECREF(typeDict); ! existing_module = module; ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 12:38:58
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22375/com/win32comext/axcontrol/src Modified Files: Tag: py3k AXControl.cpp Log Message: Merge more PYWIN32_MODULE_* macro usage from the trunk Index: AXControl.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src/AXControl.cpp,v retrieving revision 1.8.2.2 retrieving revision 1.8.2.3 diff -C2 -d -r1.8.2.2 -r1.8.2.3 *** AXControl.cpp 2 Nov 2008 11:52:02 -0000 1.8.2.2 --- AXControl.cpp 9 Dec 2008 12:38:52 -0000 1.8.2.3 *************** *** 402,406 **** ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) RETURN_ERROR; static const PyCom_InterfaceSupportInfo g_interfaceSupportData[] = --- 402,406 ---- ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) PYWIN_MODULE_INIT_RETURN_ERROR; static const PyCom_InterfaceSupportInfo g_interfaceSupportData[] = *************** *** 426,458 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initaxcontrol(void) ! #else ! PyObject *PyInit_axcontrol(void) ! #endif { ! PyObject *dict, *module; ! ! #if (PY_VERSION_HEX < 0x03000000) ! #define RETURN_ERROR return; ! module = Py_InitModule("axcontrol", axcontrol_methods); ! #else ! #define RETURN_ERROR return NULL; ! static PyModuleDef axcontrol_def = { ! PyModuleDef_HEAD_INIT, ! "axcontrol", ! "A module, encapsulating the ActiveX Control interfaces.", ! -1, ! axcontrol_methods ! }; ! module = PyModule_Create(&axcontrol_def); ! #endif ! ! if (!module) ! RETURN_ERROR; ! dict = PyModule_GetDict(module); ! if (!dict) ! RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. --- 426,433 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(axcontrol) { ! PYWIN_MODULE_INIT_PREPARE(axcontrol, axcontrol_methods, ! "A module, encapsulating the ActiveX Control interfaces."); // Register all of our interfaces, gateways and IIDs. *************** *** 485,490 **** ADD_CONSTANT(OLECREATE_LEAVERUNNING); // @const axcontrol|OLECREATE_LEAVERUNNING| ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 460,463 ---- ADD_CONSTANT(OLECREATE_LEAVERUNNING); // @const axcontrol|OLECREATE_LEAVERUNNING| ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Roger U. <ru...@us...> - 2008-12-09 08:09:57
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv25330 Modified Files: Tag: py3k win32dynamicdialog.cpp Log Message: Remove comment about ref leaks which have been fixed in this branch (but still exist in trunk) Index: win32dynamicdialog.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32dynamicdialog.cpp,v retrieving revision 1.5.2.2 retrieving revision 1.5.2.3 diff -C2 -d -r1.5.2.2 -r1.5.2.3 *** win32dynamicdialog.cpp 4 Dec 2008 01:07:20 -0000 1.5.2.2 --- win32dynamicdialog.cpp 9 Dec 2008 08:09:52 -0000 1.5.2.3 *************** *** 281,288 **** // Given a pointer to a dialog hdr template, return a Python list to match it - // ??? This leaks refs all over the place ??? markh: where? It looks OK - // to me - MakeResName creates a new reference, but its always immediately - // placed in the new list, or the list is DECREF'd on error. - // It could be simplified with a goto error handler though... /* Also need to handle extended templates (DLGTEMPLATEEX), quoting from MSDN: To distinguish between a standard template and an extended template, --- 281,284 ---- |
From: Roger U. <ru...@us...> - 2008-12-09 07:58:06
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21257 Modified Files: Tag: py3k win32security.i Log Message: Fix crash in GetNamedSecurityInfo (from main branch) Index: win32security.i =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32security.i,v retrieving revision 1.47.2.2 retrieving revision 1.47.2.3 diff -C2 -d -r1.47.2.2 -r1.47.2.3 *** win32security.i 3 Oct 2008 22:08:47 -0000 1.47.2.2 --- win32security.i 9 Dec 2008 07:58:00 -0000 1.47.2.3 *************** *** 1563,1568 **** err=GetNamedSecurityInfoW(ObjectName, object_type, required_info, NULL, NULL, NULL, NULL, &pSD); ! if (err==ERROR_SUCCESS) ! ret=new PySECURITY_DESCRIPTOR(pSD); else PyWin_SetAPIError("GetNamedSecurityInfo",err); --- 1563,1576 ---- err=GetNamedSecurityInfoW(ObjectName, object_type, required_info, NULL, NULL, NULL, NULL, &pSD); ! if (err==ERROR_SUCCESS){ ! // When retrieving security for an administrative share (C$, D$, etc) the returned security descriptor ! // may be NULL even though the return code indicates success. ! if (pSD) ! ret=new PySECURITY_DESCRIPTOR(pSD); ! else{ ! Py_INCREF(Py_None); ! ret = Py_None; ! } ! } else PyWin_SetAPIError("GetNamedSecurityInfo",err); |
From: Mark H. <mha...@us...> - 2008-12-09 07:49:31
|
Update of /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv18450/Pythonwin/pywin/mfc Modified Files: Tag: py3k object.py Log Message: Don't delegate to __ methods, avoiding recursion to death in __repr__ etc Index: object.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pywin/mfc/object.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** object.py 29 Aug 2008 06:16:42 -0000 1.3.4.1 --- object.py 9 Dec 2008 07:49:25 -0000 1.3.4.2 *************** *** 12,16 **** def __getattr__(self, attr): # Make this object look like the underlying win32ui one. # During cleanup __dict__ is not available, causing recursive death. ! if attr != '__dict__': try: o = self.__dict__['_obj_'] --- 12,16 ---- def __getattr__(self, attr): # Make this object look like the underlying win32ui one. # During cleanup __dict__ is not available, causing recursive death. ! if not attr.startswith('__'): try: o = self.__dict__['_obj_'] |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:15
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32print In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/win32/src/win32print Modified Files: win32print.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: win32print.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32print/win32print.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** win32print.cpp 13 Nov 2008 11:11:58 -0000 1.31 --- win32print.cpp 9 Dec 2008 07:21:06 -0000 1.32 *************** *** 2639,2651 **** ! extern "C" __declspec(dllexport) void ! initwin32print(void) { ! PyObject *module, *dict; ! PyWinGlobals_Ensure(); ! module = Py_InitModule("win32print", win32print_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); ! if (!dict) return; AddConstant(dict, "PRINTER_INFO_1", 1); AddConstant(dict, "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL); --- 2639,2647 ---- ! PYWIN_MODULE_INIT_FUNC(win32print) { ! PYWIN_MODULE_INIT_PREPARE(win32print, win32print_functions, ! "A module encapsulating the Windows printing API.") ! AddConstant(dict, "PRINTER_INFO_1", 1); AddConstant(dict, "PRINTER_ENUM_LOCAL", PRINTER_ENUM_LOCAL); *************** *** 2829,2831 **** --- 2825,2829 ---- } dummy_tuple=PyTuple_New(0); + + PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
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; } |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:15
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/win32/src Modified Files: _win32sysloader.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: _win32sysloader.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/_win32sysloader.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** _win32sysloader.cpp 13 Nov 2008 11:11:58 -0000 1.2 --- _win32sysloader.cpp 9 Dec 2008 07:21:06 -0000 1.3 *************** *** 76,82 **** }; ! extern "C" __declspec(dllexport) void ! init_win32sysloader(void) { ! Py_InitModule("_win32sysloader", functions); } --- 76,98 ---- }; ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void init_win32sysloader(void) { ! PyObject *module=Py_InitModule("_win32sysloader", functions); ! } ! #else ! PyObject *PyInit__win32sysloader(void) ! { ! static PyModuleDef _win32sysloader_def = { ! PyModuleDef_HEAD_INIT, ! "_win32sysloader", ! "Exists only to load Pywin32 system modules", ! -1, ! functions ! }; ! PyObject *module=PyModule_Create(&_win32sysloader_def); ! return module; } + #endif + |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/win32/src/PerfMon In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/win32/src/PerfMon Modified Files: PyPerfMon.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: PyPerfMon.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/PerfMon/PyPerfMon.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PyPerfMon.cpp 13 Nov 2008 11:11:58 -0000 1.3 --- PyPerfMon.cpp 9 Dec 2008 07:21:06 -0000 1.4 *************** *** 97,109 **** ! ! extern "C" __declspec(dllexport) void ! initperfmon(void) { ! PyObject *dict, *module; ! module = Py_InitModule("perfmon", perfmon_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); } - --- 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; } |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/com/win32comext/taskscheduler/src Modified Files: taskscheduler.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: taskscheduler.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/taskscheduler/src/taskscheduler.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** taskscheduler.cpp 18 Apr 2004 22:01:11 -0000 1.2 --- taskscheduler.cpp 9 Dec 2008 07:21:06 -0000 1.3 *************** *** 25,41 **** }; ! extern "C" __declspec(dllexport) void inittaskscheduler() { ! PyObject *module; ! module = Py_InitModule("taskscheduler", taskscheduler_methods); ! if (module==NULL) ! return; ! PyObject *dict = PyModule_GetDict(module); ! if (dict==NULL) ! return; // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); ! // trigger types PyModule_AddIntConstant(module,"TASK_TIME_TRIGGER_ONCE", TASK_TIME_TRIGGER_ONCE); --- 25,39 ---- }; ! PYWIN_MODULE_INIT_FUNC(taskscheduler) { ! PYWIN_MODULE_INIT_PREPARE(taskscheduler, taskscheduler_methods, ! "Supports the Scheduled Tasks COM interfaces"); ! ! if (PyType_Ready(&PyTASK_TRIGGERType) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); ! // trigger types PyModule_AddIntConstant(module,"TASK_TIME_TRIGGER_ONCE", TASK_TIME_TRIGGER_ONCE); *************** *** 133,135 **** --- 131,134 ---- PyModule_AddIntConstant(module,"TASKPAGE_SETTINGS", TASKPAGE_SETTINGS); + PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/win32/src/win32net In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/win32/src/win32net Modified Files: win32netmodule.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: win32netmodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/win32net/win32netmodule.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** win32netmodule.cpp 4 Jun 2008 08:18:55 -0000 1.26 --- win32netmodule.cpp 9 Dec 2008 07:21:06 -0000 1.27 *************** *** 1159,1171 **** } ! extern "C" __declspec(dllexport) void ! initwin32net(void) { ! PyObject *dict, *module; ! module = Py_InitModule("win32net", win32net_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); ! if (!dict) return; ! PyWinGlobals_Ensure(); PyDict_SetItemString(dict, "error", PyWinExc_ApiError); PyDict_SetItemString(dict, "SERVICE_SERVER", PyUnicode_FromWideChar(SERVICE_SERVER,wcslen(SERVICE_SERVER))); --- 1159,1167 ---- } ! 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); PyDict_SetItemString(dict, "SERVICE_SERVER", PyUnicode_FromWideChar(SERVICE_SERVER,wcslen(SERVICE_SERVER))); *************** *** 1191,1193 **** --- 1187,1190 ---- } #endif + PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/directsound/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/com/win32comext/directsound/src Modified Files: directsound.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: directsound.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/directsound/src/directsound.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** directsound.cpp 25 Mar 2005 01:52:11 -0000 1.8 --- directsound.cpp 9 Dec 2008 07:21:06 -0000 1.9 *************** *** 237,253 **** }; - static int AddConstant(PyObject *dict, const char *key, long value) - { - PyObject *oval = PyInt_FromLong(value); - if (!oval) - { - return 1; - } - int rc = PyDict_SetItemString(dict, (char*)key, oval); - Py_DECREF(oval); - return rc; - } ! #define ADD_CONSTANT(tok) AddConstant(dict, #tok, tok) static const PyCom_InterfaceSupportInfo g_interfaceSupportData[] = --- 237,242 ---- }; ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok) == -1) PYWIN_MODULE_INIT_RETURN_ERROR; static const PyCom_InterfaceSupportInfo g_interfaceSupportData[] = *************** *** 261,274 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) void initdirectsound() { ! char *modName = "directsound"; ! PyObject *oModule; ! // Create the module and add the functions ! oModule = Py_InitModule(modName, directsound_methods); ! if (!oModule) /* Eeek - some serious error! */ ! return; ! PyObject *dict = PyModule_GetDict(oModule); ! if (!dict) return; /* Another serious error!*/ // Register all of our interfaces, gateways and IIDs. --- 250,258 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(directsound) { ! PYWIN_MODULE_INIT_PREPARE(directsound, directsound_methods, ! "A module encapsulating the DirectSound interfaces."); ! // Register all of our interfaces, gateways and IIDs. *************** *** 395,404 **** ADD_CONSTANT(DSBPN_OFFSETSTOP); ! PyDict_SetItemString(dict, "DSCAPSType", (PyObject *)&PyDSCAPSType); ! PyDict_SetItemString(dict, "DSBCAPSType", (PyObject *)&PyDSBCAPSType); ! PyDict_SetItemString(dict, "DSBUFFERDESCType", (PyObject *)&PyDSBUFFERDESCType); ! PyDict_SetItemString(dict, "DSCCAPSType", (PyObject *)&PyDSCCAPSType); ! PyDict_SetItemString(dict, "DSCBCAPSType", (PyObject *)&PyDSCBCAPSType); ! PyDict_SetItemString(dict, "DSCBUFFERDESCType", (PyObject *)&PyDSCBUFFERDESCType); } --- 379,397 ---- ADD_CONSTANT(DSBPN_OFFSETSTOP); ! if (PyType_Ready(&PyDSCAPSType) == -1 ! ||PyType_Ready(&PyDSBCAPSType) == -1 ! ||PyType_Ready(&PyDSBUFFERDESCType) == -1 ! ||PyType_Ready(&PyDSCCAPSType) == -1 ! ||PyType_Ready(&PyDSCBCAPSType) == -1 ! ||PyType_Ready(&PyDSCBUFFERDESCType) == -1 ! ||PyDict_SetItemString(dict, "DSCAPSType", (PyObject *)&PyDSCAPSType) == -1 ! ||PyDict_SetItemString(dict, "DSBCAPSType", (PyObject *)&PyDSBCAPSType) == -1 ! ||PyDict_SetItemString(dict, "DSBUFFERDESCType", (PyObject *)&PyDSBUFFERDESCType) == -1 ! ||PyDict_SetItemString(dict, "DSCCAPSType", (PyObject *)&PyDSCCAPSType) == -1 ! ||PyDict_SetItemString(dict, "DSCBCAPSType", (PyObject *)&PyDSCBCAPSType) == -1 ! ||PyDict_SetItemString(dict, "DSCBUFFERDESCType", (PyObject *)&PyDSCBUFFERDESCType) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/internet/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/com/win32comext/internet/src Modified Files: internet.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: internet.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/internet/src/internet.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** internet.cpp 8 Dec 2008 13:16:36 -0000 1.7 --- internet.cpp 9 Dec 2008 07:21:06 -0000 1.8 *************** *** 221,225 **** /* List of module functions */ // @module internet|A module, encapsulating the ActiveX Internet interfaces ! static struct PyMethodDef internet_methods[]= { { "CoInternetCreateSecurityManager", PyCoInternetCreateSecurityManager}, // @pymeth CoInternetCreateSecurityManager| --- 221,225 ---- /* List of module functions */ // @module internet|A module, encapsulating the ActiveX Internet interfaces ! static struct PyMethodDef internet_functions[]= { { "CoInternetCreateSecurityManager", PyCoInternetCreateSecurityManager}, // @pymeth CoInternetCreateSecurityManager| *************** *** 259,263 **** PYWIN_MODULE_INIT_FUNC(internet) { ! PYWIN_MODULE_INIT_PREPARE(internet, internet_methods, "A module, encapsulating the ActiveX Internet interfaces"); --- 259,263 ---- PYWIN_MODULE_INIT_FUNC(internet) { ! PYWIN_MODULE_INIT_PREPARE(internet, internet_functions, "A module, encapsulating the ActiveX Internet interfaces"); |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/com/win32comext/ifilter/src Modified Files: PyIFilter.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: PyIFilter.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src/PyIFilter.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyIFilter.cpp 13 Nov 2008 11:11:58 -0000 1.7 --- PyIFilter.cpp 9 Dec 2008 07:21:06 -0000 1.8 *************** *** 280,285 **** } ! #define ADD_CONSTANT(tok) AddConstant(dict, #tok, tok) ! #define ADD_IID(tok) AddIID(dict, #tok, tok) // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering --- 280,285 ---- } ! #define ADD_CONSTANT(tok) if (0 != AddConstant(dict, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR ! #define ADD_IID(tok) if (0 != AddIID(dict, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering *************** *** 300,304 **** ! static struct PyMethodDef g_methods[] = { { "LoadIFilter", pyLoadIFilter, 1 }, // @pymeth Init|Description of Init --- 300,304 ---- ! static struct PyMethodDef ifilter_functions[] = { { "LoadIFilter", pyLoadIFilter, 1 }, // @pymeth Init|Description of Init *************** *** 315,331 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) void initifilter() { ! char *modName = "ifilter"; ! PyObject *oModule; ! ! PyWinGlobals_Ensure(); ! ! // Create the module and add the functions ! oModule = Py_InitModule(modName, g_methods); ! if (!oModule) /* Eeek - some serious error! */ ! return; ! PyObject *dict = PyModule_GetDict(oModule); ! if (!dict) return; /* Another serious error!*/ // Register all of our interfaces, gateways and IIDs. --- 315,322 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(ifilter) { ! PYWIN_MODULE_INIT_PREPARE(ifilter, ifilter_functions, ! "Wraps the interfaces used with Indexing Service filtering"); // Register all of our interfaces, gateways and IIDs. *************** *** 380,382 **** --- 371,375 ---- ADD_CONSTANT(FILTER_S_LAST_TEXT); // NOTE: New constants should go in ifiltercon.py + + PYWIN_MODULE_INIT_RETURN_SUCCESS; } |
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/Pythonwin Modified Files: ddemodule.cpp win32uimodule.cpp win32uiole.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: win32uiole.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uiole.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** win32uiole.cpp 13 Nov 2008 04:04:50 -0000 1.9 --- win32uiole.cpp 9 Dec 2008 07:21:06 -0000 1.10 *************** *** 188,199 **** } ! extern "C" __declspec(dllexport) void ! initwin32uiole(void) { ! PyObject *module = Py_InitModule("win32uiole", win32uiole_functions); ! if (!module) /* Eeek - some serious error! */ ! return; ! PyObject *dict = PyModule_GetDict(module); ! if (!dict) return; /* Another serious error!*/ ! AddConstants(module); } --- 188,206 ---- } ! PYWIN_MODULE_INIT_FUNC(win32uiole) { ! PYWIN_MODULE_INIT_PREPARE(win32uiole, win32uiole_functions, ! "A module, encapsulating the Microsoft Foundation Classes OLE functionality."); ! ! if (AddConstants(module)) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! ! if (PyType_Ready(&PyCCommonDialog::type) == - 1 || ! PyType_Ready(&PyCOleDialog::type) == -1 || ! PyType_Ready(&PyCOleInsertDialog::type) == -1 || ! PyType_Ready(&PyCOleDocument::type) == -1 || ! PyType_Ready(&PyCOleClientItem::type) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } Index: ddemodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/ddemodule.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ddemodule.cpp 13 Nov 2008 04:04:50 -0000 1.2 --- ddemodule.cpp 9 Dec 2008 07:21:06 -0000 1.3 *************** *** 161,211 **** ! #if (PY_VERSION_HEX < 0x03000000) ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok)) return; ! #else ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok)) return NULL; ! #endif ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initdde(void) ! #else ! PyObject *PyInit_dde(void) ! #endif { if (AfxGetApp()==NULL) { PyErr_SetString(PyExc_ImportError, "This must be an MFC application - try loading win32ui first"); ! #if (PY_VERSION_HEX < 0x03000000) ! return; ! #else ! return NULL; ! #endif } ! ! PyObject *dict, *module; ! PyWinGlobals_Ensure(); ! ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("dde", dde_functions); ! if (!module) ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! static PyModuleDef dde_def = { ! PyModuleDef_HEAD_INIT, ! "dde", ! "A module for Dynamic Data Exchange support", ! -1, ! dde_functions ! }; ! module = PyModule_Create(&dde_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif dde_module_error = PyErr_NewException("dde.error", NULL, NULL); --- 161,174 ---- ! #define ADD_CONSTANT(tok) if (PyModule_AddIntConstant(module, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR; ! PYWIN_MODULE_INIT_FUNC(dde) { if (AfxGetApp()==NULL) { PyErr_SetString(PyExc_ImportError, "This must be an MFC application - try loading win32ui first"); ! PYWIN_MODULE_INIT_RETURN_ERROR; } ! PYWIN_MODULE_INIT_PREPARE(dde, dde_functions, ! "A module for Dynamic Data Exchange support"); dde_module_error = PyErr_NewException("dde.error", NULL, NULL); *************** *** 236,241 **** ADD_CONSTANT(MF_SENDMSGS); // Notifies the callback function whenever the system or an application sends a DDE message. ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif } --- 199,202 ---- ADD_CONSTANT(MF_SENDMSGS); // Notifies the callback function whenever the system or an application sends a DDE message. ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** win32uimodule.cpp 6 Dec 2008 01:50:53 -0000 1.44 --- win32uimodule.cpp 9 Dec 2008 07:21:06 -0000 1.45 *************** *** 47,52 **** extern DWORD DebuggerThreadFunc( LPDWORD lpdwWhatever ); - static char BASED_CODE uiModName[] = "win32ui"; - // We can't init exceptionHandler in initwin32ui because the application using // us could have called SetExceptionHandler earlier. We do a forward declaration --- 47,50 ---- *************** *** 2248,2292 **** } extern bool CheckGoodWinApp(); extern HINSTANCE hWin32uiDll; // Handle to this DLL, from dllmain.cpp /* Initialize this module. */ ! extern "C" __declspec(dllexport) void ! initwin32ui(void) { ! // XXX - hack alert! ! // Win9x manages to wind up in here twice when used from a console - ! // CheckGoodWinApp() winds up re-initializing - so when we return ! // we see if we already did init, and get out. ! // Would be nice to solve this properly, but Win9x is a bitch to debug :( ! static bool bInitialized = false; ! if (!CheckGoodWinApp()) { ! PyErr_SetString(PyExc_RuntimeError, "The win32ui module could not initialize the application object."); ! return; ! } ! if (bInitialized) ! return; ! PyWinGlobals_Ensure(); ! PyObject *dict, *module; ! ! #define RETURN_ERROR return; // path to py3k... ! module = Py_InitModule(uiModName, ui_functions); ! if (!module) /* Eeek - some serious error! */ ! return; ! dict = PyModule_GetDict(module); ! if (!dict) ! RETURN_ERROR; ! ui_module_error = PyErr_NewException("win32ui.error", NULL, NULL); ! if ((ui_module_error == NULL) || PyDict_SetItemString(dict, "error", ui_module_error) == -1) ! RETURN_ERROR; ! // drop email addy - too many ppl use it for support requests for other ! // tools that simply embed Pythonwin... ! PyObject *copyright = PyWinCoreString_FromString("Copyright 1994-2008 Mark Hammond"); ! if ((copyright == NULL) || PyDict_SetItemString(dict, "copyright", copyright) == -1) ! RETURN_ERROR; ! Py_XDECREF(copyright); PyObject *dllhandle = PyWinLong_FromHANDLE(hWin32uiDll); --- 2246,2306 ---- } + + /* PyType_Ready assures that the type's tp_base is ready, but it does *not* call + itself for entries in tp_bases, leading to a crash or indecipherable errors + if one of multiple bases is not itself ready. + This should probably be reported as a bug. + */ + int PyWinType_Ready(PyTypeObject *pT) + { + if (pT->tp_flags & Py_TPFLAGS_READY) + return 0; + if (pT->tp_bases == NULL) + return 0; + Py_ssize_t base_cnt=PyTuple_GET_SIZE(pT->tp_bases); + for (Py_ssize_t b=0; b<base_cnt; b++){ + PyTypeObject *base_type = (PyTypeObject *)PyTuple_GET_ITEM(pT->tp_bases, b); + if (PyWinType_Ready(base_type) == -1) + return -1; + if (PyType_Ready(base_type) == -1) + return -1; + } + return 0; + } + extern bool CheckGoodWinApp(); extern HINSTANCE hWin32uiDll; // Handle to this DLL, from dllmain.cpp /* Initialize this module. */ ! PYWIN_MODULE_INIT_FUNC(win32ui) { ! // For various hysterical reasons, Win32uiApplicationInit also calls ! // initwin32ui, meaning we need to deal with being called multiple ! // times. ! static PyObject *existing_module = NULL; ! if (!CheckGoodWinApp()) { ! PyErr_SetString(PyExc_RuntimeError, "The win32ui module could not initialize the application object."); ! PYWIN_MODULE_INIT_RETURN_ERROR; ! } ! if (existing_module) ! #if (PY_VERSION_HEX < 0x03000000) ! return; ! #else ! return existing_module; ! #endif ! PYWIN_MODULE_INIT_PREPARE(win32ui, ui_functions, ! "A module, encapsulating the Microsoft Foundation Classes."); ! ui_module_error = PyErr_NewException("win32ui.error", NULL, NULL); ! if ((ui_module_error == NULL) || PyDict_SetItemString(dict, "error", ui_module_error) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! // drop email addy - too many ppl use it for support requests for other ! // tools that simply embed Pythonwin... ! PyObject *copyright = PyWinCoreString_FromString("Copyright 1994-2008 Mark Hammond"); ! if ((copyright == NULL) || PyDict_SetItemString(dict, "copyright", copyright) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! Py_XDECREF(copyright); PyObject *dllhandle = PyWinLong_FromHANDLE(hWin32uiDll); *************** *** 2304,2308 **** HookWindowsMessages(); // need to be notified of certain events... if (AddConstants(module) == -1) ! RETURN_ERROR; // Add all the types. --- 2318,2322 ---- HookWindowsMessages(); // need to be notified of certain events... if (AddConstants(module) == -1) ! PYWIN_MODULE_INIT_RETURN_ERROR; // Add all the types. *************** *** 2313,2324 **** ui_type_CObject *pT; ui_type_CObject::typemap->GetNextAssoc(pos, pRT, pT); ! PyObject *typeName = PyString_FromString(pT->tp_name); ! PyDict_SetItem(typeDict, typeName, (PyObject *)pT); ! Py_XDECREF(typeName); } PyDict_SetItemString(dict, "types", typeDict); Py_XDECREF(typeDict); ! bInitialized = true; } --- 2327,2345 ---- ui_type_CObject *pT; ui_type_CObject::typemap->GetNextAssoc(pos, pRT, pT); ! ! PyObject *typeName = PyWinCoreString_FromString(pT->tp_name); ! // PyType_Ready sets tp_mro for inheritance to work, so it *must* be called on the type objects now. ! if ((typeName==NULL) ! ||(PyWinType_Ready(pT)==-1) ! ||(PyDict_SetItem(typeDict, typeName, (PyObject *)pT)==-1)) ! PYWIN_MODULE_INIT_RETURN_ERROR; ! Py_XDECREF(typeName); } PyDict_SetItemString(dict, "types", typeDict); Py_XDECREF(typeDict); ! existing_module = module; ! ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } *************** *** 2423,2432 **** // a risk that when Python does "import win32ui", it // will locate a different one, causing obvious grief! initwin32ui(); - // Set sys.argv if not already done! ! PyObject *argv = PySys_GetObject("argv"); ! if (argv==NULL && __argv!=NULL && __argc > 0) ! PySys_SetArgv(__argc-1, __argv+1); // If the versions of the .h file are not in synch, then we are in trouble! if (pGlue->versionNo != WIN32UIHOSTGLUE_VERSION) { --- 2444,2464 ---- // a risk that when Python does "import win32ui", it // will locate a different one, causing obvious grief! + PyObject *argv = PySys_GetObject("argv"); + #if (PY_VERSION_HEX < 0x03000000) initwin32ui(); // Set sys.argv if not already done! ! if (argv==NULL && __targv!=NULL && __argc > 0) ! PySys_SetArgv(__argc-1, __targv+1); ! #else ! PyInit_win32ui(); ! if (argv==NULL) { ! int myargc; ! LPWSTR *myargv = CommandLineToArgvW(GetCommandLineW(), &myargc); ! if (myargv) { ! PySys_SetArgv(myargc-1, myargv+1); ! LocalFree(myargv); ! } ! } ! #endif // If the versions of the .h file are not in synch, then we are in trouble! if (pGlue->versionNo != WIN32UIHOSTGLUE_VERSION) { |