Skip to content

Commit

Permalink
There is no 'byref' in wintypes in python3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed May 1, 2017
1 parent 6086ed2 commit 14dd9a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dulwich/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ def _fileno_can_read(fileno):

def _win32_peek_avail(handle):
"""Wrapper around PeekNamedPipe to check how many bytes are available."""
from ctypes import wintypes, windll
from ctypes import byref, wintypes, windll
c_avail = wintypes.DWORD()
c_message = wintypes.DWORD()
success = windll.kernel32.PeekNamedPipe(
handle, None, 0, None, wintypes.byref(c_avail),
wintypes.byref(c_message))
handle, None, 0, None, byref(c_avail),
byref(c_message))
if not success:
raise OSError(wintypes.GetLastError())
return c_avail.value
Expand Down

0 comments on commit 14dd9a3

Please sign in to comment.