File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from ctypes import *
2- import unittest , sys
2+ import unittest
33from test import support
44
55################################################################
1010################################################################
1111
1212from 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
1814class 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
You can’t perform that action at this time.
0 commit comments