Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1076)

Side by Side Diff: Doc/library/ctypes.rst

Issue 12666: map semantic change not documented in What's New
Patch Set: Created 1 year, 9 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/argparse.rst ('k') | Doc/library/os.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`ctypes` --- A foreign function library for Python 1 :mod:`ctypes` --- A foreign function library for Python
2 ======================================================= 2 =======================================================
3 3
4 .. module:: ctypes 4 .. module:: ctypes
5 :synopsis: A foreign function library for Python. 5 :synopsis: A foreign function library for Python.
6 .. moduleauthor:: Thomas Heller <theller@python.net> 6 .. moduleauthor:: Thomas Heller <theller@python.net>
7 7
8 8
9 :mod:`ctypes` is a foreign function library for Python. It provides C compatibl e 9 :mod:`ctypes` is a foreign function library for Python. It provides C compatibl e
10 data types, and allows calling functions in DLLs or shared libraries. It can be 10 data types, and allows calling functions in DLLs or shared libraries. It can be
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 858
859 Incomplete Types 859 Incomplete Types
860 ^^^^^^^^^^^^^^^^ 860 ^^^^^^^^^^^^^^^^
861 861
862 *Incomplete Types* are structures, unions or arrays whose members are not yet 862 *Incomplete Types* are structures, unions or arrays whose members are not yet
863 specified. In C, they are specified by forward declarations, which are defined 863 specified. In C, they are specified by forward declarations, which are defined
864 later:: 864 later::
865 865
866 struct cell; /* forward declaration */ 866 struct cell; /* forward declaration */
867 867
868 struct cell { 868 struct {
869 char *name; 869 char *name;
870 struct cell *next; 870 struct cell *next;
871 }; 871 } cell;
872 872
873 The straightforward translation into ctypes code would be this, but it does not 873 The straightforward translation into ctypes code would be this, but it does not
874 work:: 874 work::
875 875
876 >>> class cell(Structure): 876 >>> class cell(Structure):
877 ... _fields_ = [("name", c_char_p), 877 ... _fields_ = [("name", c_char_p),
878 ... ("next", POINTER(cell))] 878 ... ("next", POINTER(cell))]
879 ... 879 ...
880 Traceback (most recent call last): 880 Traceback (most recent call last):
881 File "<stdin>", line 1, in ? 881 File "<stdin>", line 1, in ?
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 2431
2432 2432
2433 .. _ctypes-arrays-pointers: 2433 .. _ctypes-arrays-pointers:
2434 2434
2435 Arrays and pointers 2435 Arrays and pointers
2436 ^^^^^^^^^^^^^^^^^^^ 2436 ^^^^^^^^^^^^^^^^^^^
2437 2437
2438 Not yet written - please see the sections :ref:`ctypes-pointers` and section 2438 Not yet written - please see the sections :ref:`ctypes-pointers` and section
2439 :ref:`ctypes-arrays` in the tutorial. 2439 :ref:`ctypes-arrays` in the tutorial.
2440 2440
OLDNEW
« no previous file with comments | « Doc/library/argparse.rst ('k') | Doc/library/os.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7