[3.10] bpo-46584: remove check for py2.3 from ctypes/test_python_api (GH-31024) (GH-31054)

(cherry picked from commit 913e340a32)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
Miss Islington (bot) 2022-02-01 06:42:37 -08:00 committed by GitHub
parent 1dcd772804
commit 8765b01bcf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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")