From d52a5276d85b9173c6bba7882085da835cde19ce Mon Sep 17 00:00:00 2001 From: Samuel Merritt Date: Thu, 24 May 2018 11:44:49 -0700 Subject: [PATCH] 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 --- swift/common/splice.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/swift/common/splice.py b/swift/common/splice.py index f5d81d8d10..3d25d08386 100644 --- a/swift/common/splice.py +++ b/swift/common/splice.py @@ -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: