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

1234

/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/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_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_functions.py23 _fields_ = [("x", c_int), ("y", c_int)]
25 _fields_ = [("left", c_int), ("top", c_int),
26 ("right", c_int), ("bottom", c_int)]
72 f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double]
83 f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double]
91 f.argtypes = [c_int, c_int, POINTE
[all...]
H A Dtest_as_parameter.py15 _fields_ = [("x", c_int), ("y", c_int)]
27 f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double]
34 f.restype = POINTER(c_int)
35 f.argtypes = [POINTER(c_int)]
37 # This only works if the value c_int(42) passed to the
41 v = c_int(42)
45 self.assertEqual(type(result), POINTER(c_int))
52 p = pointer(c_int(99))
67 CallBack = CFUNCTYPE(c_int, c_in
197 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_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.py8 array = (c_int * 3)(42, 17, 2)
11 ptr = cast(array, POINTER(c_int))
14 if 2*sizeof(c_short) == sizeof(c_int):
24 array = (c_int * 3)(42, 17, 2)
27 ptr = cast(c_void_p(address), POINTER(c_int))
30 ptr = cast(address, POINTER(c_int))
51 p = cast((c_int * 4)(1, 2, 3, 4), POINTER(c_int))
56 c_int()
66 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 res.contents = c_int(12321)
61 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)
107 c_int(9
[all...]
H A Dtest_values.py14 an_integer = c_int.in_dll(ctdll, "an_integer")
22 self.assertRaises(ValueError, c_int.in_dll, ctdll, "Undefined_Symbol")
35 opt = c_int.in_dll(pydll, "Py_OptimizeFlag").value
55 ("size", c_int)]
79 self.assertRaises(ValueError, c_int.in_dll, pydll, "Undefined_Symbol")
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/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_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_functions.py23 _fields_ = [("x", c_int), ("y", c_int)]
25 _fields_ = [("left", c_int), ("top", c_int),
26 ("right", c_int), ("bottom", c_int)]
72 f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double]
83 f.argtypes = [c_byte, c_short, c_int, c_long, c_float, c_double]
91 f.argtypes = [c_int, c_int, POINTE
[all...]
H A Dtest_as_parameter.py15 _fields_ = [("x", c_int), ("y", c_int)]
27 f.argtypes = [c_byte, c_wchar, c_int, c_long, c_float, c_double]
34 f.restype = POINTER(c_int)
35 f.argtypes = [POINTER(c_int)]
37 # This only works if the value c_int(42) passed to the
41 v = c_int(42)
45 self.assertEqual(type(result), POINTER(c_int))
52 p = pointer(c_int(99))
67 CallBack = CFUNCTYPE(c_int, c_in
197 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_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.py8 array = (c_int * 3)(42, 17, 2)
11 ptr = cast(array, POINTER(c_int))
14 if 2*sizeof(c_short) == sizeof(c_int):
24 array = (c_int * 3)(42, 17, 2)
27 ptr = cast(c_void_p(address), POINTER(c_int))
30 ptr = cast(address, POINTER(c_int))
51 p = cast((c_int * 4)(1, 2, 3, 4), POINTER(c_int))
56 c_int()
66 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 res.contents = c_int(12321)
61 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)
107 c_int(9
[all...]
/prebuilts/python/darwin-x86/2.7.5/lib/python2.7/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...]
/prebuilts/python/linux-x86/2.7.5/lib/python2.7/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...]

Completed in 227 milliseconds

1234