mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Patch #1448199: Release GIL around ConnectRegistry.
This commit is contained in:
parent
8cab8b03e5
commit
bda0dde1c4
3 changed files with 7 additions and 0 deletions
|
@ -151,3 +151,6 @@ if remote_name is not None:
|
||||||
else:
|
else:
|
||||||
print "Remote registry calls can be tested using",
|
print "Remote registry calls can be tested using",
|
||||||
print "'test_winreg.py --remote \\\\machine_name'"
|
print "'test_winreg.py --remote \\\\machine_name'"
|
||||||
|
# perform minimal ConnectRegistry test which just invokes it
|
||||||
|
h = ConnectRegistry(None, HKEY_LOCAL_MACHINE)
|
||||||
|
h.Close()
|
||||||
|
|
|
@ -61,6 +61,8 @@ Library
|
||||||
Extension Modules
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Patch #1448199: Release interpreter lock in _winreg.ConnectRegistry.
|
||||||
|
|
||||||
- Patch #1521817: Index range checking on ctypes arrays containing
|
- Patch #1521817: Index range checking on ctypes arrays containing
|
||||||
exactly one element enabled again. This allows iterating over these
|
exactly one element enabled again. This allows iterating over these
|
||||||
arrays, without the need to check the array size before.
|
arrays, without the need to check the array size before.
|
||||||
|
|
|
@ -960,7 +960,9 @@ PyConnectRegistry(PyObject *self, PyObject *args)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
|
if (!PyHKEY_AsHKEY(obKey, &hKey, FALSE))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Py_BEGIN_ALLOW_THREADS
|
||||||
rc = RegConnectRegistry(szCompName, hKey, &retKey);
|
rc = RegConnectRegistry(szCompName, hKey, &retKey);
|
||||||
|
Py_END_ALLOW_THREADS
|
||||||
if (rc != ERROR_SUCCESS)
|
if (rc != ERROR_SUCCESS)
|
||||||
return PyErr_SetFromWindowsErrWithFunction(rc,
|
return PyErr_SetFromWindowsErrWithFunction(rc,
|
||||||
"ConnectRegistry");
|
"ConnectRegistry");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue