[pywin32-checkins] pywin32/Pythonwin win32uimodule.cpp,1.41,1.42
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-03 22:34:24
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv1177/Pythonwin Modified Files: win32uimodule.cpp Log Message: Many 'benign' changes from the py3k branch, mainly around using PYWIN_OBJECT_HEAD and whitespace related changes around the type defs. Index: win32uimodule.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/win32uimodule.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** win32uimodule.cpp 13 Nov 2008 04:04:50 -0000 1.41 --- win32uimodule.cpp 3 Dec 2008 22:34:20 -0000 1.42 *************** *** 131,140 **** // probably better, as is forces _all_ python objects have the same type sig. static PyTypeObject type_template = { ! PyObject_HEAD_INIT(&PyType_Type) ! 0, /*ob_size*/ "template", /*tp_name*/ sizeof(ui_base_class), /*tp_size*/ 0, /*tp_itemsize*/ - /* methods */ (destructor) ui_base_class::sui_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ --- 131,138 ---- // probably better, as is forces _all_ python objects have the same type sig. static PyTypeObject type_template = { ! PYWIN_OBJECT_HEAD "template", /*tp_name*/ sizeof(ui_base_class), /*tp_size*/ 0, /*tp_itemsize*/ (destructor) ui_base_class::sui_dealloc, /*tp_dealloc*/ 0, /*tp_print*/ *************** *** 143,147 **** 0, /*tp_compare*/ (reprfunc)ui_base_class::sui_repr, /*tp_repr*/ ! 0, /*tp_as_number*/ }; --- 141,145 ---- 0, /*tp_compare*/ (reprfunc)ui_base_class::sui_repr, /*tp_repr*/ ! 0, /*tp_as_number*/ }; *************** *** 2256,2269 **** return; dict = PyModule_GetDict(module); ! if (!dict) return; /* Another serious error!*/ ui_module_error = PyErr_NewException("win32ui.error", NULL, NULL); ! if (!ui_module_error) return; /* Another serious error!*/ ! PyDict_SetItemString(dict, "error", ui_module_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); --- 2254,2270 ---- 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); *************** *** 2280,2284 **** HookWindowsMessages(); // need to be notified of certain events... ! AddConstants(module); // Add all the types. --- 2281,2286 ---- HookWindowsMessages(); // need to be notified of certain events... ! if (AddConstants(module) == -1) ! RETURN_ERROR; // Add all the types. |