[pywin32-checkins] /hgroot/pywin32/pywin32: Release thread lock when calling OpenPr...
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <pyw...@li...> - 2013-03-24 14:37:46
|
changeset 4eb23404a352 in /hgroot/pywin32/pywin32 details: http://pywin32.hg.sourceforge.net/hgweb/pywin32/pywin32/hgroot/pywin32/pywin32?cmd=changeset;node=4eb23404a352 summary: Release thread lock when calling OpenPrinter diffstat: win32/src/win32print/win32print.cpp | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diffs (16 lines): diff -r 554980ba3e5a -r 4eb23404a352 win32/src/win32print/win32print.cpp --- a/win32/src/win32print/win32print.cpp Sun Mar 24 10:10:32 2013 -0400 +++ b/win32/src/win32print/win32print.cpp Sun Mar 24 10:37:00 2013 -0400 @@ -126,7 +126,11 @@ pprinter_defaults=&printer_defaults; } if (PyWinObject_AsTCHAR(obprinter, &printer, TRUE)){ - if (OpenPrinter(printer, &handle, pprinter_defaults)) + BOOL bsuccess; + Py_BEGIN_ALLOW_THREADS + bsuccess = OpenPrinter(printer, &handle, pprinter_defaults); + Py_END_ALLOW_THREADS + if (bsuccess) ret=PyWinObject_FromPrinterHANDLE(handle); else PyWin_SetAPIError("OpenPrinter"); |