Searched refs:c_int (Results 1 - 25 of 55) sorted by relevance

123

/external/python/cpython2/Lib/ctypes/test/
H A Dtest_funcptr.py15 X = WINFUNCTYPE(c_int, c_int, c_int)
21 self.assertEqual(x.restype, c_int)
22 self.assertEqual(x.argtypes, (c_int, c_int))
27 StdCallback = WINFUNCTYPE(c_int, c_int, c_int)
28 CdeclCallback = CFUNCTYPE(c_int, c_in
[all...]
H A Dtest_anon.py8 _fields_ = [("a", c_int),
9 ("b", c_int)]
12 _fields_ = [("x", c_int),
14 ("y", c_int)]
17 self.assertEqual(Y.a.offset, sizeof(c_int))
18 self.assertEqual(Y.b.offset, sizeof(c_int))
40 _fields_ = [("a", c_int)]
44 ("b", c_int)]
48 _fields_ = [("x", c_int),
50 ("y", c_int)]
[all...]
H A Dtest_functions.py24 _fields_ = [("x", c_int), ("y", c_int)]
26 _fields_ = [("left", c_int), ("top", c_int),
27 ("right", c_int), ("bottom", c_int)]
70 f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double]
78 f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double]
86 f.argtypes = [c_int, c_int, POINTE
[all...]
H A Dtest_as_parameter.py15 _fields_ = [("x", c_int), ("y", c_int)]
24 f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double]
31 f.restype = POINTER(c_int)
32 f.argtypes = [POINTER(c_int)]
34 # This only works if the value c_int(42) passed to the
38 v = c_int(42)
42 self.assertEqual(type(result), POINTER(c_int))
49 p = pointer(c_int(99))
64 CallBack = CFUNCTYPE(c_int, c_in
190 from ctypes import c_int namespace
[all...]
H A Dtest_varsize_struct.py7 _fields_ = [("item", c_int),
8 ("array", c_int * 1)]
10 self.assertEqual(sizeof(X), sizeof(c_int) * 2)
14 self.assertEqual(sizeof(x), sizeof(c_int) * 2)
17 new_size = sizeof(X) + sizeof(c_int) * 1
23 new_size = sizeof(X) + sizeof(c_int) * 9
29 new_size = sizeof(X) + sizeof(c_int) * 1
36 self.assertRaises(ValueError, lambda: c_int * -1)
37 self.assertRaises(ValueError, lambda: c_int * -3)
40 array = (c_int *
[all...]
H A Dtest_frombuffer.py7 _fields_ = [("c_int", c_int)]
15 x = (c_int * 16).from_buffer(a)
18 self.assertEqual(y.c_int, a[0])
29 c_int.from_buffer, a, -1)
40 x = (c_int * 15).from_buffer(a, sizeof(c_int))
43 self.assertRaises(ValueError, lambda: (c_int * 16).from_buffer(a, sizeof(c_int)))
44 self.assertRaises(ValueError, lambda: (c_int *
[all...]
H A Dtest_refcounts.py5 MyCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int)
6 OtherCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_ulonglong)
17 f.restype = ctypes.c_int
18 f.argtypes = [ctypes.c_int, MyCallback]
88 proto = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int)
93 a = sys.getrefcount(ctypes.c_int)
[all...]
H A Dtest_delattr.py5 _fields_ = [("foo", c_int)]
10 delattr, c_int(42), "value")
H A Dtest_cast.py9 array = (c_int * 3)(42, 17, 2)
12 ptr = cast(array, POINTER(c_int))
15 if 2*sizeof(c_short) == sizeof(c_int):
25 array = (c_int * 3)(42, 17, 2)
28 ptr = cast(c_void_p(address), POINTER(c_int))
31 ptr = cast(address, POINTER(c_int))
52 p = cast((c_int * 4)(1, 2, 3, 4), POINTER(c_int))
57 c_int()
67 c_int()
[all...]
H A Dtest_pointers.py6 ctype_types = [c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint,
27 i = c_int(12345678)
28 ## func.argtypes = (POINTER(c_int),)
30 self.assertEqual(c_int.from_address(address).value, 12345678)
32 func.restype = POINTER(c_int)
41 i = c_int(87654)
42 func.restype = POINTER(c_int)
43 func.argtypes = (POINTER(c_int),)
56 x = c_int(12321)
65 PROTOTYPE = CFUNCTYPE(c_int, POINTE
[all...]
H A Dtest_keeprefs.py6 x = c_int()
10 x = c_int(99)
24 _fields_ = [("a", c_int),
25 ("b", c_int)]
46 _fields_ = [("x", c_int), ("y", c_int)]
69 INTARR = c_int * 3
79 _fields_ = [("x", c_int),
92 i = c_int(42)
108 c_int(9
[all...]
H A Dtest_values.py15 an_integer = c_int.in_dll(ctdll, "an_integer")
23 self.assertRaises(ValueError, c_int.in_dll, ctdll, "Undefined_Symbol")
36 opt = c_int.in_dll(pythonapi, "Py_OptimizeFlag").value
56 ("size", c_int)]
79 self.assertRaises(ValueError, c_int.in_dll, pythonapi,
H A Dtest_random_things.py49 cb = CFUNCTYPE(c_int, c_int)(callback_func)
55 cb = CFUNCTYPE(c_int, c_int)(callback_func)
61 cb = CFUNCTYPE(c_int, c_double)(callback_func)
67 cb = CFUNCTYPE(c_int, c_char_p)(callback_func)
H A Dtest_structures.py10 _fields_ = [("a", c_int)]
13 _fields_ = [("b", c_int)]
18 self.assertEqual(sizeof(X), sizeof(c_int))
19 self.assertEqual(sizeof(Y), sizeof(c_int)*2)
20 self.assertEqual(sizeof(Z), sizeof(c_int))
21 self.assertEqual(X._fields_, [("a", c_int)])
22 self.assertEqual(Y._fields_, [("b", c_int)])
23 self.assertEqual(Z._fields_, [("a", c_int)])
29 X._fields_ = [("a", c_int)]
34 Y._fields_ = [("b", c_int)]
[all...]
H A Dtest_parameters.py87 from ctypes import c_short, c_uint, c_int, c_long, POINTER, pointer namespace
88 LPINT = POINTER(c_int)
90 ## p = pointer(c_int(42))
92 x = LPINT.from_param(pointer(c_int(42)))
94 self.assertEqual(LPINT(c_int(42)).contents.value, 42)
98 if c_int != c_long:
106 from ctypes import c_short, c_uint, c_int, c_long, pointer, POINTER, byref namespace
107 LPINT = POINTER(c_int)
109 LPINT.from_param(byref(c_int(42)))
112 if c_int !
118 from ctypes import c_short, c_uint, c_int, c_long, pointer, POINTER, byref namespace
129 from ctypes import c_short, c_uint, c_int, c_long, POINTER namespace
[all...]
H A Dtest_internals.py27 ci = c_int(i)
40 _fields_ = [("a", c_int), ("b", c_int)]
52 _fields_ = [("a", c_int), ("b", c_int)]
90 _fields_ = [("data", POINTER(c_int))]
92 A = c_int*4
H A Dtest_callbacks.py52 self.check_type(c_int, 42)
53 self.check_type(c_int, -42)
192 @CFUNCTYPE(c_int, POINTER(c_int), POINTER(c_int))
196 array = (c_int * 5)(5, 1, 99, 7, 33)
198 libc.qsort(array, len(array), sizeof(c_int), cmp_func)
219 CALLBACK = CFUNCTYPE(c_int, c_int, c_int, c_in
[all...]
H A Dtest_arrays.py8 formats = c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, \
77 numarray = ARRAY(c_int, alen)
83 na = numarray(*[c_int()] * alen)
91 na = numarray(*map(c_int, (1, 2, 3, 4, 5)))
96 self.assertIsNot(ARRAY(c_int, 3), ARRAY(c_int, 4))
97 self.assertIs(ARRAY(c_int, 3), ARRAY(c_int, 3))
128 class my_int(c_int):
H A Dtest_bitfields.py10 _fields_ = [("A", c_int, 1),
11 ("B", c_int, 2),
12 ("C", c_int, 3),
13 ("D", c_int, 4),
14 ("E", c_int, 5),
15 ("F", c_int, 6),
16 ("G", c_int, 7),
17 ("H", c_int, 8),
18 ("I", c_int, 9),
50 signed_int_types = (c_byte, c_short, c_int, c_lon
[all...]
H A Dtest_pickling.py8 _fields_ = [("a", c_int), ("b", c_double)]
26 c_int(42),
57 prototype = CFUNCTYPE(c_int)
63 pointer(c_int(42)),
H A Dtest_simplesubclasses.py4 class MyInt(c_int):
40 cb = CFUNCTYPE(c_int, c_int)(func)
/external/python/cpython2/Lib/test/leakers/
H A Dtest_ctypes.py4 from ctypes import Structure, c_int, POINTER namespace
9 _fields_ = [("x", c_int)]
/external/python/cpython2/Lib/lib2to3/tests/data/
H A Dinfinite_recursion.py19 __darwin_nl_item = c_int
20 __darwin_wctrans_t = c_int
26 __int32_t = c_int
32 __darwin_ct_rune_t = c_int
43 __darwin_ptrdiff_t = c_int
46 __darwin_wchar_t = c_int
48 __darwin_wint_t = c_int
53 sig_atomic_t = c_int
57 ('sc_onstack', c_int),
58 ('sc_mask', c_int),
[all...]
/external/autotest/client/cros/graphics/
H A Ddrm.py59 ("version_major", c_int),
60 ("version_minor", c_int),
61 ("version_patchlevel", c_int),
62 ("name_len", c_int),
64 ("date_len", c_int),
66 ("desc_len", c_int),
91 ("count_fbs", c_int),
93 ("count_crtcs", c_int),
95 ("count_connectors", c_int),
97 ("count_encoders", c_int),
[all...]
/external/autotest/client/site_tests/kernel_CryptoAPI/
H A Dkernel_CryptoAPI.py98 libc.socket.argtypes = [ ctypes.c_int, ctypes.c_int, ctypes.c_int ]
99 libc.bind.argtypes = [ ctypes.c_int, ctypes.c_void_p, ctypes.c_int ]
100 libc.send.argtypes = [ ctypes.c_int, ctypes.c_void_p, ctypes.c_size_t,
101 ctypes.c_int ]
102 libc.recv.argtypes = [ ctypes.c_int, ctypes.c_void_p, ctypes.c_size_t,
103 ctypes.c_int ]

Completed in 770 milliseconds

123