8000 [3.10] bpo-46584: remove check for `py2.3` from `ctypes/test_python_a… · python/cpython@8765b01 · GitHub
[go: up one dir, main page]

Skip to content
10000

Commit 8765b01

Browse files
[3.10] bpo-46584: remove check for py2.3 from ctypes/test_python_api (GH-31024) (GH-31054)
(cherry picked from commit 913e340) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
1 parent 1dcd772 commit 8765b01

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 c 8000 types 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)
0