Clean out Python 2.6 leftovers from splice.py
ctypes.ssize_t exists since Python 2.7 (not just the fuzzy 2.7.X, but CPython tag "v2.7"), so we don't need to define our own. Change-Id: Ib3c9b162ceffabd78622ae51c5accc4b7ba1294d
This commit is contained in:
parent
8403ca3915
commit
d52a5276d8
|
@ -28,9 +28,6 @@ __all__ = ['tee', 'splice']
|
|||
|
||||
c_loff_t = ctypes.c_long
|
||||
|
||||
# python 2.6 doesn't have c_ssize_t
|
||||
c_ssize_t = getattr(ctypes, 'c_ssize_t', ctypes.c_long)
|
||||
|
||||
|
||||
class Tee(object):
|
||||
'''Binding to `tee`'''
|
||||
|
@ -53,7 +50,7 @@ class Tee(object):
|
|||
ctypes.c_uint
|
||||
]
|
||||
|
||||
c_tee.restype = c_ssize_t
|
||||
c_tee.restype = ctypes.c_ssize_t
|
||||
|
||||
def errcheck(result, func, arguments):
|
||||
if result == -1:
|
||||
|
@ -134,7 +131,7 @@ class Splice(object):
|
|||
ctypes.c_uint
|
||||
]
|
||||
|
||||
c_splice.restype = c_ssize_t
|
||||
c_splice.restype = ctypes.c_ssize_t
|
||||
|
||||
def errcheck(result, func, arguments):
|
||||
if result == -1:
|
||||
|
|
Loading…
Reference in New Issue