summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--paramiko/_winapi.py19
-rw-r--r--sites/www/changelog.rst5
2 files changed, 24 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 7ff3f36c..fc9532fb 100644
--- a/sites/www/changelog.rst
+++ b/sites/www/changelog.rst
@@ -2,6 +2,11 @@
Changelog
=========
+* :bug:`758 (1.16+)` Apply type definitions to ``_winapi`` module from
+ `jaraco.windows <https://github.com/jaraco/jaraco.windows>`_ 3.6.1. This
+ should address issues on Windows platforms that often result in errors like
+ ``ArgumentError: [...] int too long to convert``. Thanks to ``@swohlerLL``
+ for the report and Jason R. Coombs for the patch.
* :release:`2.0.1 <2016-06-21>`
* :release:`1.17.1 <2016-06-21>`
* :release:`1.16.2 <2016-06-21>`