Skip to content

Commit 60e4cf7

Browse files
miss-islingtonsobolevn
authored andcommitted
[3.9] bpo-46584: remove check for py2.3 from ctypes/test_python_api (pythonGH-31024) (pythonGH-31053)
(cherry picked from commit 913e340) Co-authored-by: Nikita Sobolev <[email protected]>
1 parent fb5a4a8 commit 60e4cf7

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)