From 913e340a323c7e61ae6e4acbb1312b4342657bec Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Tue, 1 Feb 2022 16:56:25 +0300 Subject: bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024) --- Lib/ctypes/test/test_python_api.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Lib/ctypes/test/test_python_api.py b/Lib/ctypes/test/test_python_api.py index 9c13746..49571f9 100644 --- a/Lib/ctypes/test/test_python_api.py +++ b/Lib/ctypes/test/test_python_api.py @@ -1,5 +1,5 @@ from ctypes import * -import unittest, sys +import unittest from test import support ################################################################ @@ -10,10 +10,6 @@ from _ctypes import PyObj_FromPtr ################################################################ from sys import getrefcount as grc -if sys.version_info > (2, 4): - c_py_ssize_t = c_size_t -else: - c_py_ssize_t = c_int class PythonAPITestCase(unittest.TestCase): @@ -21,7 +17,7 @@ class PythonAPITestCase(unittest.TestCase): PyBytes_FromStringAndSize = pythonapi.PyBytes_FromStringAndSize PyBytes_FromStringAndSize.restype = py_object - PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t + PyBytes_FromStringAndSize.argtypes = c_char_p, c_size_t self.assertEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc") -- cgit v0.12