From: Nikita Sobolev Date: Tue, 1 Feb 2022 13:56:25 +0000 (+0300) Subject: bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024) X-Git-Tag: v3.11.0a5~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=913e340a323c7e61ae6e4acbb1312b4342657bec;p=thirdparty%2FPython%2Fcpython.git bpo-46584: remove check for `py2.3` from `ctypes/test_python_api` (GH-31024) --- diff --git a/Lib/ctypes/test/test_python_api.py b/Lib/ctypes/test/test_python_api.py index 9c137469c3b5..49571f97bbe1 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")