Home
last modified time | relevance | path

Searched refs:c_char (Results 1 – 25 of 33) sorted by relevance

12

/third_party/python/Lib/ctypes/test/
Dtest_bytes.py8 x = c_char(b"x")
9 self.assertRaises(TypeError, c_char, "x")
13 c_char.from_param(b"x")
14 self.assertRaises(TypeError, c_char.from_param, "x")
15 self.assertIn('xbd', repr(c_char.from_param(b"\xbd")))
16 (c_char * 3)(b"a", b"b", b"c")
17 self.assertRaises(TypeError, c_char * 3, "a", "b", "c")
40 _fields_ = [("a", c_char * 3)]
Dtest_frombuffer.py42 (c_char * 16).from_buffer(b"a" * 16)
44 (c_char * 16).from_buffer(memoryview(b"a" * 16))
46 (c_char * 16).from_buffer(memoryview(bytearray(b"a" * 16))[::-1])
49 (c_char * 16).from_buffer("a" * 16)
60 (c_char * 16).from_buffer(array)
65 (c_char * 16).from_buffer(array)
80 a = [c_char.from_buffer(memoryview(bytearray(b'a')))]
106 x = (c_char * 16).from_buffer_copy(b"a" * 16)
109 (c_char * 16).from_buffer_copy("a" * 16)
Dtest_stringptr.py14 _fields_ = [("str", POINTER(c_char))]
52 strchr.argtypes = c_char_p, c_char
58 strchr.argtypes = POINTER(c_char), c_char
67 strchr.restype = POINTER(c_char)
Dtest_returnfuncptrs.py13 get_strchr.restype = CFUNCTYPE(c_char_p, c_char_p, c_char)
30 strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(addr)
40 strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(("my_strchr", dll))
58 strchr = CFUNCTYPE(c_char_p, c_char_p, c_char)(
Dtest_libc.py21 comparefunc = CFUNCTYPE(c_int, POINTER(c_char), POINTER(c_char))
29 lib.my_qsort(chars, len(chars)-1, sizeof(c_char), comparefunc(sort))
Dtest_structures.py55 formats = {"c": c_char,
73 _fields_ = [("x", c_char),
81 _fields_ = [("x", c_char),
88 _fields_ = [("x", c_char * 3)]
93 _fields_ = [("x", c_char * 3),
142 ("y", c_char)]
148 self.assertEqual(X.y.size, sizeof(c_char))
156 ("y", c_char)]
162 self.assertEqual(X.y.size, sizeof(c_char))
225 _fields_ = [("name", c_char*6),
[all …]
Dtest_arrays.py51 CharArray = ARRAY(c_char, 3)
76 a = (c_char * 5)()
112 sz = (c_char * 3).from_address(addressof(p))
230 c_char * sys.maxsize * 2
235 c_char * size
Dtest_repr.py12 class X(c_char):
25 self.assertEqual("c_char(b'x')", repr(c_char(b'x')))
Dtest_prototypes.py96 func.argtypes = POINTER(c_char),
104 ca = c_char(b"a")
119 ca = c_char(b"a")
134 ca = c_char(b"a")
Dtest_strings.py7 BUF = c_char * 4
47 BUF = c_char * 4
52 BUF = c_char * 4
58 BUF = c_char * 4
Dtest_byteswap.py170 self.assertIs(c_char.__ctype_le__, c_char)
171 self.assertIs(c_char.__ctype_be__, c_char)
193 ("n", c_char),
Dtest_buffers.py10 self.assertEqual(sizeof(b), 32 * sizeof(c_char))
15 self.assertEqual(sizeof(b), 4 * sizeof(c_char))
Dtest_funcptr.py99 strchr.argtypes = (c_char_p, c_char)
112 return (c_char*size)(*init)
Dtest_delattr.py14 delattr, (c_char * 5)(), "value")
Dtest_numbers.py196 from ctypes import c_char
201 v = c_char.from_address(a.buffer_info()[0])
203 self.assertIs(type(v), c_char)
Dtest_pep3118.py148 (c_char, "<c", (), c_char),
Dtest_slicing.py66 dll.my_strdup.restype = POINTER(c_char)
121 p = (c_char * 27)(*s)
Dtest_struct_fields.py51 _fields_ = (("char", c_char * 5),)
Dtest_pickling.py70 self.dumps(c_char(b"x"))
Dtest_parameters.py207 c_char,
227 self.assertEqual(repr(c_char.from_param(97)), "<cparam 'c' ('a')>")
Dtest_python_api.py71 PyOS_snprintf.argtypes = POINTER(c_char), c_size_t, c_char_p
Dtest_bitfields.py28 func.argtypes = POINTER(BITS), c_char
131 result = self.fail_fields(("a", c_char, 1))
/third_party/python/Lib/ctypes/
D__init__.py57 buftype = c_char * size
63 buftype = c_char * init
233 class c_char(_SimpleCData): class
235 c_char.__ctype_le__ = c_char.__ctype_be__ = c_char
236 _check_size(c_char)
270 POINTER(c_char).from_param = c_char_p.from_param
/third_party/python/Lib/multiprocessing/
Dsharedctypes.py26 'c': ctypes.c_char, 'u': ctypes.c_wchar,
110 if obj._type_ is ctypes.c_char:
/third_party/python/Lib/lib2to3/tests/data/
Dinfinite_recursion.py37 ('__mbstate8', c_char * 128),
1499 ('ctype', c_char * 7),
2112 ('__opaque', c_char * 36),
2120 ('__opaque', c_char * 24),
2128 ('__opaque', c_char * 4),
2136 ('__opaque', c_char * 40),
2144 ('__opaque', c_char * 8),
2152 ('__opaque', c_char * 4),
2160 ('__opaque', c_char * 124),
2168 ('__opaque', c_char * 12),
[all …]

12