[pywin32-checkins] pywin32/Pythonwin pythondoc.h,1.2,1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2006-12-22 03:57:54
|
Update of /cvsroot/pywin32/pywin32/Pythonwin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27395 Modified Files: pythondoc.h Log Message: Grab GIL to report error. Index: pythondoc.h =================================================================== RCS file: /cvsroot/pywin32/pywin32/Pythonwin/pythondoc.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pythondoc.h 30 Mar 2000 02:12:44 -0000 1.2 --- pythondoc.h 22 Dec 2006 03:57:52 -0000 1.3 *************** *** 134,137 **** --- 134,138 ---- CVirtualHelper helper( "OnOpenDocument", this ); if (!helper.HaveHandler()) { + CEnterLeavePython _celp; // grab lock to report error PyErr_SetString(ui_module_error,"PyCDocument::OnOpenDocument handler does not exist."); gui_print_error(); *************** *** 164,170 **** int ret; // @rdesc TRUE if a new document could be created, else FALSE. ! if (helper.retval(ret)) return ret; else { PyErr_SetString(PyExc_TypeError, "PyCDocument.OnNewDocument - bad return type."); gui_print_error(); --- 165,172 ---- int ret; // @rdesc TRUE if a new document could be created, else FALSE. ! if (helper.retval(ret)) return ret; else { + CEnterLeavePython _celp; // grab lock to report error PyErr_SetString(PyExc_TypeError, "PyCDocument.OnNewDocument - bad return type."); gui_print_error(); |