File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1
1
from c
8000
types import *
2
- import unittest , sys
2
+ import unittest
3
3
from test import support
4
4
5
5
################################################################
10
10
################################################################
11
11
12
12
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
17
13
18
14
class PythonAPITestCase (unittest .TestCase ):
19
15
20
16
def test_PyBytes_FromStringAndSize (self ):
21
17
PyBytes_FromStringAndSize = pythonapi .PyBytes_FromStringAndSize
22
18
23
19
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
25
21
26
22
self .assertEqual (PyBytes_FromStringAndSize (b"abcdefghi" , 3 ), b"abc" )
27
23
You can’t perform that action at this time.
0 commit comments