[ctypes-commit] ctypes/docs/manual reference.txt,1.7,1.8
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-05-29 16:35:23
|
Update of /cvsroot/ctypes/ctypes/docs/manual In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv11774 Modified Files: reference.txt Log Message: Add simple data types. Index: reference.txt =================================================================== RCS file: /cvsroot/ctypes/ctypes/docs/manual/reference.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** reference.txt 29 May 2006 12:09:37 -0000 1.7 --- reference.txt 29 May 2006 16:35:17 -0000 1.8 *************** *** 196,197 **** --- 196,330 ---- library. name is the name of the symbol that exports the data, library is the loaded shared library. + + simple data types + ----------------- + + ``_SimpleCData`` : classdesc* + This non-public class is the base class of all ctypes data + types. It is mentioned here because it contains the common + attributes of the ctypes data types. + + ``value`` : memberdesc + This attribute contains the actual value of the instance. For + integer types, it is an integer. + + These are the simple ctypes data types: + + ``c_byte([value]) : classdesc* + Represents a C signed char datatype, and interprets the value as + small integer. The constructor accepts an optional integer + initializer; no overflow checking is done. + + ``c_char`` : classdesc* + Represents a C char datatype, and interprets the value as a single + character. The constructor accepts an optional string initializer, + the length of the string must be exactly one character. + + ``c_char_p`` : classdesc* + Represents a C char * datatype, which must be a pointer to a + zero-terminated string. The constructor accepts an integer + address, or a string. + + ``c_double`` : classdesc* + Represents a C double datatype. The constructor accepts an + optional float initializer. + + ``c_float`` : classdesc* + Represents a C double datatype. The constructor accepts an + optional float initializer. + + ``c_int`` : classdesc* + Represents a C signed int datatype. The constructor accepts an + optional integer initializer; no overflow checking is done. On + platforms where ``sizeof(int) == sizeof(long)`` it is an alias to + ``c_long``. + + ``c_int16`` : classdesc* + Represents a C 16-bit signed int datatype. Usually an alias for + ``c_short``. + + ``c_int32`` : classdesc* + Represents a C 32-bit signed int datatype. Usually an alias for + ``c_int``. + + ``c_int64`` : classdesc* + Represents a C 64-bit ``signed int`` datatype. Usually an alias + for ``c_longlong``. + + ``c_int8`` : classdesc* + Represents a C 8-bit ``signed int`` datatype. Usually an alias for + ``c_byte``. + + ``c_long`` : classdesc* + Represents a C ``signed long`` datatype. The constructor accepts an + optional integer initializer; no overflow checking is done. + + ``c_longlong`` : classdesc* + Represents a C ``signed long long`` datatype. The constructor accepts + an optional integer initializer; no overflow checking is done. + + ``c_short`` : classdesc* + Represents a C ``signed short`` datatype. The constructor accepts an + optional integer initializer; no overflow checking is done. + + ``c_size_t`` : classdesc* + Represents a C ``size_t`` datatype. + + ``c_ubyte`` : classdesc* + Represents a C ``unsigned char`` datatype, it interprets the + value as small integer. The constructor accepts an optional + integer initializer; no overflow checking is done. + + ``c_uint`` : classdesc* + Represents a C ``unsigned int`` datatype. The constructor accepts an + optional integer initializer; no overflow checking is done. On + platforms where ``sizeof(int) == sizeof(long)`` it is an alias for + ``c_ulong``. + + ``c_uint16`` : classdesc* + Represents a C 16-bit unsigned int datatype. Usually an alias for + ``c_ushort``. + + ``c_uint32`` : classdesc* + Represents a C 32-bit unsigned int datatype. Usually an alias for + ``c_uint``. + + ``c_uint64`` : classdesc* + Represents a C 64-bit unsigned int datatype. Usually an alias for + ``c_ulonglong``. + + ``c_uint8`` : classdesc* + Represents a C 8-bit unsigned int datatype. Usually an alias for + ``c_ubyte``. + + ``c_ulong`` : classdesc* + Represents a C unsigned long datatype. The constructor accepts an + optional integer initializer; no overflow checking is done. + + ``c_ulonglong`` : classdesc* + Represents a C unsigned long long datatype. The constructor + accepts an optional integer initializer; no overflow checking is + done. + + ``c_ushort`` : classdesc* + Represents a C unsigned short datatype. The constructor accepts an + optional integer initializer; no overflow checking is done. + + ``c_void_p`` : classdesc* + Represents a C void * type. The value is represented as + integer. The constructor accepts an optional integer initializer. + + ``c_wchar`` : classdesc* + Represents a C ``wchar_t`` datatype, and interprets the value as a + single character unicode string. The constructor accepts an + optional string initializer, the length of the string must be + exactly one character. + + ``c_wchar_p`` : classdesc* + Represents a C ``wchar_t *`` datatype, which must be a pointer to + a zero-terminated wide character string. The constructor accepts + an integer address, or a string. + + ``HRESULT`` : classdesc* + Windows only: Represents a HRESULT value, which contains success + or error information for a function or method call. |