638
edits
(add jorendorff stuff, partly compatible) |
|||
| Line 105: | Line 105: | ||
'''ctypes.bool, short, unsigned_short, int, unsigned, unsigned_int, long, unsigned_long, float, double''' - Types that behave like the corresponding C types. Some or all of these might be aliases for the primitive types listed above. As in C, ''unsigned'' is always an alias for ''unsigned_int''. | '''ctypes.bool, short, unsigned_short, int, unsigned, unsigned_int, long, unsigned_long, float, double''' - Types that behave like the corresponding C types. Some or all of these might be aliases for the primitive types listed above. As in C, ''unsigned'' is always an alias for ''unsigned_int''. | ||
''(TBD: Do we want char types? how should they behave?)'' | ''(TBD: Do we want char types? how should they behave?)'' | ||
| Line 122: | Line 120: | ||
Examples: | Examples: | ||
const DWORD = ctypes.uint32_t; | |||
const HANDLE = new ctypes.PointerType("HANDLE"); | |||
const FILE = new ctypes.PointerType("FILE *"); | |||
const IOBuf = new ctypes.ArrayType(ctypes.uint8_t, 4096); | |||
const struct_tm = new ctypes.Struct('tm', [[ctypes.int, 'tm_sec'], ...]); | |||
== Calling types == | == Calling types == | ||
edits