summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-07-22 09:40:19 -0400
committerJason R. Coombs <jaraco@jaraco.com>2016-07-22 09:40:19 -0400
commit88364beba125cc8e6e314885db1c909b3d526340 (patch)
tree7216d778a004570112903d36fdf9895288e1aad3
parent920bd292ea4cd3157a62c5deaaae0ea56740afa2 (diff)
Add type declarations for Windows API calls as found in jaraco.windows 3.6.1. Fixes #758.
-rw-r--r--paramiko/_winapi.py19
-rw-r--r--sites/www/changelog.rst2
2 files changed, 21 insertions, 0 deletions
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!)