Home
last modified time | relevance | path

Searched refs:c_char_p (Results 1 – 25 of 35) sorted by relevance

12

/third_party/python/Lib/ctypes/test/
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_prototypes.py84 func.argtypes = c_char_p,
95 func.restype = c_char_p
100 self.assertEqual(None, func(c_char_p(None)))
101 self.assertEqual(b"123", func(c_char_p(b"123")))
110 func.restype = c_char_p
111 func.argtypes = c_char_p,
115 self.assertEqual(None, func(c_char_p(None)))
116 self.assertEqual(b"123", func(c_char_p(b"123")))
125 func.restype = c_char_p
130 self.assertEqual(b"123", func(c_char_p(b"123")))
[all …]
Dtest_parameters.py25 from ctypes import c_void_p, c_char_p
32 class CCHARP(c_char_p):
53 from ctypes import c_char_p
58 self.assertIs(c_char_p.from_param(s)._obj, s)
61 self.assertEqual(c_char_p.from_param(b"123")._obj, b"123")
62 self.assertRaises(TypeError, c_char_p.from_param, "123\377")
63 self.assertRaises(TypeError, c_char_p.from_param, 42)
67 a = c_char_p(b"123")
68 self.assertIs(c_char_p.from_param(a), a)
222 c_char_p,
[all …]
Dtest_keeprefs.py14 x = c_char_p()
18 x = c_char_p(b"spam")
35 _fields_ = [("a", c_char_p),
36 ("b", c_char_p)]
100 _fields_ = [("p", POINTER(c_char_p))]
102 i = c_char_p("abc def")
Dtest_funcptr.py54 LPCTSTR = c_char_p
98 strchr.restype = c_char_p
99 strchr.argtypes = (c_char_p, c_char)
105 strtok.restype = c_char_p
Dtest_cast.py35 array = (c_char_p * 5)()
40 p = cast(array, POINTER(c_char_p))
75 s = c_char_p(b"hiho")
76 self.assertEqual(cast(cast(s, c_void_p), c_char_p).value,
Dtest_stringptr.py34 _fields_ = [("str", c_char_p)]
48 strchr.restype = c_char_p
52 strchr.argtypes = c_char_p, c_char
Dtest_internals.py31 cs = c_char_p(s)
65 _fields_ = [("a", c_char_p), ("b", c_char_p)]
Dtest_python_api.py24 PyBytes_FromStringAndSize.argtypes = c_char_p, c_py_ssize_t
31 pythonapi.PyBytes_FromString.argtypes = (c_char_p,)
71 PyOS_snprintf.argtypes = POINTER(c_char), c_size_t, c_char_p
Dtest_random_things.py20 windll.kernel32.GetProcAddress.argtypes = c_void_p, c_char_p
70 cb = CFUNCTYPE(c_int, c_char_p)(callback_func)
Dtest_errno.py18 libc_open.argtypes = c_char_p, c_int
34 libc_open.argtypes = c_char_p, c_int
Dtest_unicode.py41 func.argtypes = [ctypes.c_char_p]
42 func.restype = ctypes.c_char_p
Dtest_bytes.py31 c_char_p(b"foo bar")
32 self.assertRaises(TypeError, c_char_p, "foo bar")
Dtest_pickling.py15 _fields_ = [("str", c_char_p)]
60 c_char_p(),
Dtest_incomplete.py14 _fields_ = [("name", c_char_p),
Dtest_pointers.py148 func.restype = c_char_p
149 argv = (c_char_p * 2)()
Dtest_values.py51 _fields_ = [("name", c_char_p),
Dtest_memfunctions.py43 self.assertEqual(cast(a, c_char_p).value, b"abcdef")
Dtest_callbacks.py97 self.check_type(c_char_p, "abc")
98 self.check_type(c_char_p, "def")
Dtest_loading.py111 windll.kernel32.GetProcAddress.argtypes = c_void_p, c_char_p
/third_party/pulseaudio/src/tests/
Dvolume-ui.py19 _to_name.restype = c_char_p
23 _to_pretty_name.restype = c_char_p
27 _snprint.restype = c_char_p
28 _snprint.argtypes = [c_char_p, c_ulong, c_void_p]
31 _position_to_string.restype = c_char_p
35 _position_to_pretty_string.restype = c_char_p
48 _parse.argtypes = [c_void_p, c_char_p]
87 _snprint.restype = c_char_p
88 _snprint.argtypes = [c_char_p, c_ulong, c_void_p]
/third_party/python/Lib/ctypes/
D__init__.py238 class c_char_p(_SimpleCData): class
242 _check_size(c_char_p, "P")
270 POINTER(c_char).from_param = c_char_p.from_param
Dwintypes.py37 LPCSTR = LPSTR = ctypes.c_char_p
/third_party/mindspore/mindspore/parallel/
D_dp_allreduce_fusion.py36 return ctypes.c_char_p(string.encode('utf-8'))
/third_party/mindspore/mindspore/communication/
D_hccl_management.py88 return ctypes.c_char_p(string.encode('utf-8'))

12