[pywin32-checkins] pywin32/com/win32comext/axcontrol/src AXControl.cpp, 1.10, 1.11
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-08 13:16:48
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11284/com/win32comext/axcontrol/src Modified Files: AXControl.cpp Log Message: py3k friendly: PYWIN_MODULE_* macros to help with module's init etc. Index: AXControl.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/axcontrol/src/AXControl.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AXControl.cpp 13 Nov 2008 11:11:58 -0000 1.10 --- AXControl.cpp 8 Dec 2008 13:16:36 -0000 1.11 *************** *** 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,440 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) void initaxcontrol() { ! char *modName = "axcontrol"; ! PyObject *module; ! // Create the module and add the functions ! module = Py_InitModule(modName, axcontrol_methods); ! #define RETURN_ERROR return // towards py3k ! if (!module) /* Eeek - some serious error! */ ! return; ! PyObject *dict = PyModule_GetDict(module); ! if (!dict) return; /* Another serious 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. *************** *** 466,468 **** --- 459,463 ---- ADD_CONSTANT(EMBDHLP_DELAYCREATE); // @const axcontrol|EMBDHLP_DELAYCREATE| ADD_CONSTANT(OLECREATE_LEAVERUNNING); // @const axcontrol|OLECREATE_LEAVERUNNING| + + PYWIN_MODULE_INIT_RETURN_SUCCESS; } |