Home
last modified time | relevance | path

Searched refs:ctypes (Results 1 – 25 of 530) sorted by relevance

12345678910>>...22

/external/python/cpython3/Lib/ctypes/
Dwintypes.py2 import ctypes
4 BYTE = ctypes.c_byte
5 WORD = ctypes.c_ushort
6 DWORD = ctypes.c_ulong
9 CHAR = ctypes.c_char
10 WCHAR = ctypes.c_wchar
11 UINT = ctypes.c_uint
12 INT = ctypes.c_int
14 DOUBLE = ctypes.c_double
15 FLOAT = ctypes.c_float
[all …]
/external/capstone/bindings/python/capstone/
Dx86.py3 import ctypes
8 class X86OpMem(ctypes.Structure):
10 ('segment', ctypes.c_uint),
11 ('base', ctypes.c_uint),
12 ('index', ctypes.c_uint),
13 ('scale', ctypes.c_int),
14 ('disp', ctypes.c_int64),
17 class X86OpValue(ctypes.Union):
19 ('reg', ctypes.c_uint),
20 ('imm', ctypes.c_int64),
[all …]
Dm68k.py3 import ctypes
8 class M68KOpMem(ctypes.Structure):
10 ('base_reg', ctypes.c_uint),
11 ('index_reg', ctypes.c_uint),
12 ('in_base_reg', ctypes.c_uint),
13 ('in_disp', ctypes.c_uint),
14 ('out_disp', ctypes.c_uint),
15 ('disp', ctypes.c_short),
16 ('scale', ctypes.c_ubyte),
17 ('bitfield', ctypes.c_ubyte),
[all …]
Darm.py3 import ctypes
8 class ArmOpMem(ctypes.Structure):
10 ('base', ctypes.c_uint),
11 ('index', ctypes.c_uint),
12 ('scale', ctypes.c_int),
13 ('disp', ctypes.c_int),
14 ('lshift', ctypes.c_int),
17 class ArmOpShift(ctypes.Structure):
19 ('type', ctypes.c_uint),
20 ('value', ctypes.c_uint),
[all …]
Darm64.py3 import ctypes
8 class Arm64OpMem(ctypes.Structure):
10 ('base', ctypes.c_uint),
11 ('index', ctypes.c_uint),
12 ('disp', ctypes.c_int32),
15 class Arm64OpShift(ctypes.Structure):
17 ('type', ctypes.c_uint),
18 ('value', ctypes.c_uint),
21 class Arm64OpValue(ctypes.Union):
23 ('reg', ctypes.c_uint),
[all …]
Dm680x.py3 import ctypes
8 class M680xOpIdx(ctypes.Structure):
10 ('base_reg', ctypes.c_uint),
11 ('offset_reg', ctypes.c_uint),
12 ('offset', ctypes.c_int16),
13 ('offset_addr', ctypes.c_uint16),
14 ('offset_bits', ctypes.c_uint8),
15 ('inc_dec', ctypes.c_int8),
16 ('flags', ctypes.c_uint8),
19 class M680xOpRel(ctypes.Structure):
[all …]
Dtms320c64x.py3 import ctypes, copy
7 class TMS320C64xOpMem(ctypes.Structure):
9 ('base', ctypes.c_int),
10 ('disp', ctypes.c_int),
11 ('unit', ctypes.c_int),
12 ('scaled', ctypes.c_int),
13 ('disptype', ctypes.c_int),
14 ('direction', ctypes.c_int),
15 ('modify', ctypes.c_int),
18 class TMS320C64xOpValue(ctypes.Union):
[all …]
D__init__.py266 import ctypes, ctypes.util
287 return ctypes.cdll.LoadLibrary(lib_file)
292 return ctypes.cdll.LoadLibrary(lib_file + '.4')
325 ctypes.memmove(ctypes.byref(dst), ctypes.byref(src), ctypes.sizeof(type(src)))
334 class _cs_arch(ctypes.Union):
351 class _cs_detail(ctypes.Structure):
353 ('regs_read', ctypes.c_uint16 * 16),
354 ('regs_read_count', ctypes.c_ubyte),
355 ('regs_write', ctypes.c_uint16 * 20),
356 ('regs_write_count', ctypes.c_ubyte),
[all …]
Dppc.py3 import ctypes
8 class PpcOpMem(ctypes.Structure):
10 ('base', ctypes.c_uint),
11 ('disp', ctypes.c_int32),
14 class PpcOpCrx(ctypes.Structure):
16 ('scale', ctypes.c_uint),
17 ('reg', ctypes.c_uint),
18 ('cond', ctypes.c_uint),
21 class PpcOpValue(ctypes.Union):
23 ('reg', ctypes.c_uint),
[all …]
Dsystemz.py3 import ctypes
8 class SyszOpMem(ctypes.Structure):
10 ('base', ctypes.c_uint8),
11 ('index', ctypes.c_uint8),
12 ('length', ctypes.c_uint64),
13 ('disp', ctypes.c_int64),
16 class SyszOpValue(ctypes.Union):
18 ('reg', ctypes.c_uint),
19 ('imm', ctypes.c_int64),
23 class SyszOp(ctypes.Structure):
[all …]
Dsparc.py3 import ctypes
8 class SparcOpMem(ctypes.Structure):
10 ('base', ctypes.c_uint8),
11 ('index', ctypes.c_uint8),
12 ('disp', ctypes.c_int32),
15 class SparcOpValue(ctypes.Union):
17 ('reg', ctypes.c_uint),
18 ('imm', ctypes.c_int64),
22 class SparcOp(ctypes.Structure):
24 ('type', ctypes.c_uint),
[all …]
Dxcore.py3 import ctypes
8 class XcoreOpMem(ctypes.Structure):
10 ('base', ctypes.c_uint8),
11 ('index', ctypes.c_uint8),
12 ('disp', ctypes.c_int32),
13 ('direct', ctypes.c_int),
16 class XcoreOpValue(ctypes.Union):
18 ('reg', ctypes.c_uint),
19 ('imm', ctypes.c_int32),
23 class XcoreOp(ctypes.Structure):
[all …]
Dmips.py3 import ctypes
8 class MipsOpMem(ctypes.Structure):
10 ('base', ctypes.c_uint),
11 ('disp', ctypes.c_int64),
14 class MipsOpValue(ctypes.Union):
16 ('reg', ctypes.c_uint),
17 ('imm', ctypes.c_int64),
21 class MipsOp(ctypes.Structure):
23 ('type', ctypes.c_uint),
40 class CsMips(ctypes.Structure):
[all …]
Dmos65xx.py3 import ctypes
8 class MOS65xxOpValue(ctypes.Union):
10 ('reg', ctypes.c_uint),
11 ('imm', ctypes.c_uint8),
12 ('mem', ctypes.c_uint16),
15 class MOS65xxOp(ctypes.Structure):
17 ('type', ctypes.c_uint),
34 class CsMOS65xx(ctypes.Structure):
36 ('am', ctypes.c_uint),
37 ('modifies_flags', ctypes.c_uint8),
[all …]
/external/chromium-trace/catapult/third_party/pyserial/serial/tools/
Dlist_ports_osx.py24 import ctypes
25 from ctypes import util
28 iokit = ctypes.cdll.LoadLibrary(ctypes.util.find_library('IOKit'))
29 cf = ctypes.cdll.LoadLibrary(ctypes.util.find_library('CoreFoundation'))
31 kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault")
32 kCFAllocatorDefault = ctypes.c_void_p.in_dll(cf, "kCFAllocatorDefault")
36 iokit.IOServiceMatching.restype = ctypes.c_void_p
38 iokit.IOServiceGetMatchingServices.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
39 iokit.IOServiceGetMatchingServices.restype = ctypes.c_void_p
41 iokit.IORegistryEntryGetParentEntry.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
[all …]
Dlist_ports_windows.py1 import ctypes
6 raise ctypes.WinError()
11 from ctypes.wintypes import HANDLE
12 from ctypes.wintypes import BOOL
13 from ctypes.wintypes import HWND
14 from ctypes.wintypes import DWORD
15 from ctypes.wintypes import WORD
16 from ctypes.wintypes import LONG
17 from ctypes.wintypes import ULONG
18 from ctypes.wintypes import LPCSTR
[all …]
/external/python/cpython2/Lib/ctypes/test/
Dtest_unicode.py3 import ctypes
4 from ctypes.test import need_symbol
11 dll = ctypes.CDLL(_ctypes_test.__file__)
13 cls.wcslen.argtypes = [ctypes.c_wchar_p]
15 self.prev_conv_mode = ctypes.set_conversion_mode("ascii", "strict")
18 ctypes.set_conversion_mode(*self.prev_conv_mode)
22 ctypes.set_conversion_mode("ascii", "strict")
28 self.assertRaises(ctypes.ArgumentError, wcslen, "ab�")
32 ctypes.set_conversion_mode("ascii", "replace")
40 ctypes.set_conversion_mode("ascii", "ignore")
[all …]
Dtest_refcounts.py2 import ctypes
5 MyCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int)
6 OtherCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_ulonglong)
9 dll = ctypes.CDLL(_ctypes_test.__file__)
17 f.restype = ctypes.c_int
18 f.argtypes = [ctypes.c_int, MyCallback]
56 class X(ctypes.Structure):
88 proto = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int)
93 a = sys.getrefcount(ctypes.c_int)
95 self.assertEqual(sys.getrefcount(ctypes.c_int), a)
/external/chromium-trace/catapult/common/py_trace_event/py_trace_event/
Dtrace_time.py5 import ctypes
6 import ctypes.util
56 libc = ctypes.CDLL('/usr/lib/libc.dylib', use_errno=True)
57 class MachTimebaseInfoData(ctypes.Structure):
59 _fields_ = (('numer', ctypes.c_uint32),
60 ('denom', ctypes.c_uint32))
63 mach_absolute_time.restype = ctypes.c_uint64
66 libc.mach_timebase_info(ctypes.byref(timebase))
92 clock_gettime = ctypes.CDLL(ctypes.util.find_library('c'),
96 clock_gettime = ctypes.CDLL(ctypes.util.find_library('rt'),
[all …]
/external/python/cffi/demo/
Dreaddir_ctypes.py5 import ctypes
11 DIR_p = ctypes.c_void_p
12 ino_t = ctypes.c_long
13 off_t = ctypes.c_long
15 class DIRENT(ctypes.Structure):
19 ('d_reclen', ctypes.c_ushort), # length of this record
20 ('d_type', ctypes.c_ubyte), # type of file; not supported
22 ('d_name', ctypes.c_char * 256), # filename
24 DIRENT_p = ctypes.POINTER(DIRENT)
25 DIRENT_pp = ctypes.POINTER(DIRENT_p)
[all …]
/external/bcc/tools/
Dtcptracer.py21 import ctypes
499 class TCPIPV4Evt(ctypes.Structure):
501 ("ts_ns", ctypes.c_ulonglong),
502 ("type", ctypes.c_uint),
503 ("pid", ctypes.c_uint),
504 ("comm", ctypes.c_char * TASK_COMM_LEN),
505 ("ip", ctypes.c_ubyte),
506 ("saddr", ctypes.c_uint),
507 ("daddr", ctypes.c_uint),
508 ("sport", ctypes.c_ushort),
[all …]
/external/python/cpython3/Lib/ctypes/test/
Dtest_refcounts.py3 import ctypes
6 MyCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int)
7 OtherCallback = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_ulonglong)
10 dll = ctypes.CDLL(_ctypes_test.__file__)
19 f.restype = ctypes.c_int
20 f.argtypes = [ctypes.c_int, MyCallback]
59 class X(ctypes.Structure):
91 proto = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_int)
96 a = sys.getrefcount(ctypes.c_int)
98 self.assertEqual(sys.getrefcount(ctypes.c_int), a)
/external/python/cpython3/Lib/multiprocessing/
Dsharedctypes.py10 import ctypes
26 'c': ctypes.c_char, 'u': ctypes.c_wchar,
27 'b': ctypes.c_byte, 'B': ctypes.c_ubyte,
28 'h': ctypes.c_short, 'H': ctypes.c_ushort,
29 'i': ctypes.c_int, 'I': ctypes.c_uint,
30 'l': ctypes.c_long, 'L': ctypes.c_ulong,
31 'q': ctypes.c_longlong, 'Q': ctypes.c_ulonglong,
32 'f': ctypes.c_float, 'd': ctypes.c_double
40 size = ctypes.sizeof(type_)
50 ctypes.memset(ctypes.addressof(obj), 0, ctypes.sizeof(obj))
[all …]
/external/python/cpython2/Lib/multiprocessing/
Dsharedctypes.py36 import ctypes
49 'c': ctypes.c_char,
50 'b': ctypes.c_byte, 'B': ctypes.c_ubyte,
51 'h': ctypes.c_short, 'H': ctypes.c_ushort,
52 'i': ctypes.c_int, 'I': ctypes.c_uint,
53 'l': ctypes.c_long, 'L': ctypes.c_ulong,
54 'f': ctypes.c_float, 'd': ctypes.c_double
57 typecode_to_type['u'] = ctypes.c_wchar
67 size = ctypes.sizeof(type_)
77 ctypes.memset(ctypes.addressof(obj), 0, ctypes.sizeof(obj))
[all …]
/external/python/cffi/cffi/
Dbackend_ctypes.py1 import ctypes, ctypes.util, operator, sys
75 address += 1 << (8*ctypes.sizeof(ctypes.c_void_p))
92 return ctypes.sizeof(cls._ctype)
95 return ctypes.sizeof(self._ctype)
106 return ctypes.alignment(cls._ctype)
168 return self._addr_repr(ctypes.addressof(self._blob))
197 self._as_ctype_ptr = ctypes.cast(address, cls._ctype)
218 return ctypes.cast(address, cls._ctype)
222 address = ctypes.cast(ctypes_ptr, ctypes.c_void_p).value or 0
247 return self._addr_repr(ctypes.addressof(self._blob))
[all …]

12345678910>>...22