Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b68a125

Browse files
committed
Added additional index entries.
Minor markup nits.
1 parent 76dd228 commit b68a125

1 file changed

Lines changed: 14 additions & 11 deletions

File tree

Doc/lib/libstruct.tex

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
\section{\module{struct} ---
2-
Interpret strings as packed binary data.}
2+
Interpret strings as packed binary data}
33
\declaremodule{builtin}{struct}
44

55
\modulesynopsis{Interpret strings as packed binary data.}
66

7-
\indexii{C@\C{}}{structures}
7+
\indexii{C}{structures}
8+
\indexiii{packing}{binary}{data}
89

9-
This module performs conversions between Python values and \C{}
10+
This module performs conversions between Python values and C
1011
structs represented as Python strings. It uses \dfn{format strings}
11-
(explained below) as compact descriptions of the lay-out of the \C{}
12-
structs and the intended conversion to/from Python values.
12+
(explained below) as compact descriptions of the lay-out of the C
13+
structs and the intended conversion to/from Python values. This can
14+
be used in handling binary data stored in files or from network
15+
connections, among other sources.
1316

1417
The module defines the following exception and functions:
1518

@@ -40,7 +43,7 @@ \section{\module{struct} ---
4043
\end{funcdesc}
4144

4245
Format characters have the following meaning; the conversion between
43-
\C{} and Python values should be obvious given their types:
46+
C and Python values should be obvious given their types:
4447

4548
\begin{tableiii}{c|l|l}{samp}{Format}{C Type}{Python}
4649
\lineiii{x}{pad byte}{no value}
@@ -96,9 +99,9 @@ \section{\module{struct} ---
9699
meaning a Python long integer will be used to hold the pointer; other
97100
platforms use 32-bit pointers and will use a Python integer.
98101

99-
By default, \C{} numbers are represented in the machine's native format
102+
By default, C numbers are represented in the machine's native format
100103
and byte order, and properly aligned by skipping pad bytes if
101-
necessary (according to the rules used by the \C{} compiler).
104+
necessary (according to the rules used by the C compiler).
102105

103106
Alternatively, the first character of the format string can be used to
104107
indicate the byte order, size and alignment of the packed data,
@@ -118,7 +121,7 @@ \section{\module{struct} ---
118121
host system (e.g. Motorola and Sun are big-endian; Intel and DEC are
119122
little-endian).
120123

121-
Native size and alignment are determined using the \C{} compiler's
124+
Native size and alignment are determined using the C compiler's
122125
\keyword{sizeof} expression. This is always combined with native byte
123126
order.
124127

@@ -168,6 +171,6 @@ \section{\module{struct} ---
168171
standard size and alignment does not enforce any alignment.
169172

170173
\begin{seealso}
171-
\seemodule{array}{packed binary storage of homogeneous data}
172-
\seemodule{xdrlib}{packing and unpacking of XDR data}
174+
\seemodule{array}{Packed binary storage of homogeneous data.}
175+
\seemodule{xdrlib}{Packing and unpacking of XDR data.}
173176
\end{seealso}

0 commit comments

Comments
 (0)