[ctypes-commit] ctypes/docs/manual table.txt,NONE,1.1 tutorial.txt,1.3,1.4
Brought to you by:
theller
From: Thomas H. <th...@us...> - 2006-03-24 19:03:57
|
Update of /cvsroot/ctypes/ctypes/docs/manual In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12411 Modified Files: tutorial.txt Added Files: table.txt Log Message: save the table separately Index: tutorial.txt =================================================================== RCS file: /cvsroot/ctypes/ctypes/docs/manual/tutorial.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tutorial.txt 21 Mar 2006 21:17:51 -0000 1.3 --- tutorial.txt 24 Mar 2006 19:03:12 -0000 1.4 *************** *** 3,12 **** =============== - This tutorial is based on Thomas Heller's tutorial, which is included in - ctypes distribution, and available online at - http://starship.python.net/crew/theller/ctypes/tutorial.html - - .. contents:: - This tutorial describes version 0.9.9 of ``ctypes``. Since older versions are quite common, I'll mention major differences --- 3,6 ---- *************** *** 160,203 **** ``ctypes`` defines a number of primitive C compatible data types : ! +---------------+-----------------------+-----------+ ! |ctypes' type |C type |Python type| ! +===============+=======================+===========+ ! |``c_char`` |``char`` |character | ! +---------------+-----------------------+-----------+ ! |``c_byte`` |``char`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_ubyte`` |``unsigned char`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_short`` |``short`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_ushort`` |``unsigned short`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_int`` |``int`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_uint`` |``unsigned int`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_long`` |``long`` |integer | ! +---------------+-----------------------+-----------+ ! |``c_ulong`` |``unsigned long`` |long | ! +---------------+-----------------------+-----------+ ! |``c_longlong`` |``__int64`` or |long | ! | |``long long`` | | ! +---------------+-----------------------+-----------+ ! |``c_ulonglong``|``unsigned __int64`` or|long | ! | |``unsigned long long`` | | ! +---------------+-----------------------+-----------+ ! |``c_float`` |``float`` |float | ! +---------------+-----------------------+-----------+ ! |``c_double`` |``double`` |float | ! +---------------+-----------------------+-----------+ ! |``c_char_p`` |``char *`` |string or | ! | |(NUL terminated) |``None`` | ! +---------------+-----------------------+-----------+ ! |``c_wchar_p`` |``wchar_t *`` |unicode or | ! | |(NUL terminated) |``None`` | ! +---------------+-----------------------+-----------+ ! |``c_void_p`` |``void *`` |integer or | ! | | |``None`` | ! +---------------+-----------------------+-----------+ All these types can be created by calling them with an optional --- 154,158 ---- ``ctypes`` defines a number of primitive C compatible data types : ! XXX table missing, rst2latex is not able to handle it ;-( All these types can be created by calling them with an optional --- NEW FILE: table.txt --- +---------------+-----------------------+-----------+ |ctypes' type |C type |Python type| +===============+=======================+===========+ |``c_char`` |``char`` |character | +---------------+-----------------------+-----------+ |``c_byte`` |``char`` |integer | +---------------+-----------------------+-----------+ |``c_ubyte`` |``unsigned char`` |integer | +---------------+-----------------------+-----------+ |``c_short`` |``short`` |integer | +---------------+-----------------------+-----------+ |``c_ushort`` |``unsigned short`` |integer | +---------------+-----------------------+-----------+ |``c_int`` |``int`` |integer | +---------------+-----------------------+-----------+ |``c_uint`` |``unsigned int`` |integer | +---------------+-----------------------+-----------+ |``c_long`` |``long`` |integer | +---------------+-----------------------+-----------+ |``c_ulong`` |``unsigned long`` |long | +---------------+-----------------------+-----------+ |``c_longlong`` |``__int64`` or |long | | |``long long`` | | +---------------+-----------------------+-----------+ |``c_ulonglong``|``unsigned __int64`` or|long | | |``unsigned long long`` | | +---------------+-----------------------+-----------+ |``c_float`` |``float`` |float | +---------------+-----------------------+-----------+ |``c_double`` |``double`` |float | +---------------+-----------------------+-----------+ |``c_char_p`` |``char *`` |string or | | |(NUL terminated) |``None`` | +---------------+-----------------------+-----------+ |``c_wchar_p`` |``wchar_t *`` |unicode or | | |(NUL terminated) |``None`` | +---------------+-----------------------+-----------+ |``c_void_p`` |``void *`` |integer or | | | |``None`` | +---------------+-----------------------+-----------+ |