Skip to content

Commit 913e340

Browse files
authored
bpo-46584: remove check for py2.3 from ctypes/test_python_api (GH-31024)
1 parent 0515eaf commit 913e340

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Lib/ctypes/test/test_python_api.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from ctypes import *
2-
import unittest, sys
2+
import unittest
33
from test import support
44

55
################################################################
@@ -10,18 +10,14 @@
1010
################################################################
1111

1212
from sys import getrefcount as grc
13-
if sys.version_info > (2, 4):
14-
c_py_ssize_t = c_size_t
15-
else:
16-
c_py_ssize_t = c_int
1713

1814
class PythonAPITestCase(unittest.TestCase):
1915

2016
def test_PyBytes_FromStringAndSize(self):
2117
PyBytes_FromStringAndSize = pythonapi.PyBytes_FromStringAndSize
2218

2319
PyBytes_FromStringAndSize.restype = py_object
24-
PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t
20+
PyBytes_FromStringAndSize.argtypes = c_char_p, c_size_t
2521

2622
self.assertEqual(PyBytes_FromStringAndSize(b"abcdefghi", 3), b"abc")
2723

0 commit comments

Comments
 (0)