From 88364beba125cc8e6e314885db1c909b3d526340 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 22 Jul 2016 09:40:19 -0400 Subject: Add type declarations for Windows API calls as found in jaraco.windows 3.6.1. Fixes #758. --- paramiko/_winapi.py | 19 +++++++++++++++++++ sites/www/changelog.rst | 2 ++ 2 files changed, 21 insertions(+) diff --git a/paramiko/_winapi.py b/paramiko/_winapi.py index 77e0129c..94bf6017 100644 --- a/paramiko/_winapi.py +++ b/paramiko/_winapi.py @@ -118,6 +118,18 @@ CreateFileMapping.restype = ctypes.wintypes.HANDLE MapViewOfFile = ctypes.windll.kernel32.MapViewOfFile MapViewOfFile.restype = ctypes.wintypes.HANDLE +UnmapViewOfFile = ctypes.windll.kernel32.UnmapViewOfFile +UnmapViewOfFile.argtypes = ctypes.wintypes.HANDLE, + +RtlMoveMemory = ctypes.windll.kernel32.RtlMoveMemory +RtlMoveMemory.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_size_t, +) + +ctypes.windll.kernel32.LocalFree.argtypes = ctypes.wintypes.HLOCAL, + ##################### # jaraco.windows.mmap @@ -307,6 +319,13 @@ class SECURITY_ATTRIBUTES(ctypes.Structure): self._descriptor = value self.lpSecurityDescriptor = ctypes.addressof(value) + +ctypes.windll.advapi32.SetSecurityDescriptorOwner.argtypes = ( + ctypes.POINTER(SECURITY_DESCRIPTOR), + ctypes.c_void_p, + ctypes.wintypes.BOOL, +) + ######################### # jaraco.windows.security diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 8574adc0..8736f3df 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -3,6 +3,8 @@ Changelog ========= * :release:`1.16.2 <2016-06-21>` +* :bug:`758 (1.16+)` Apply type definitions to ``_winapi`` module from + jaraco.windows 3.6.1. * :bug:`520 (1.16+)` (Partial fix) Fix at least one instance of race condition driven threading hangs at end of the Python interpreter session. (Includes a docs update as well - always make sure to ``.close()`` your clients!) -- cgit v1.2.3