diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2009-10-08 15:59:20 +0000 |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2009-10-08 15:59:20 +0000 |
commit | 024753e40b985a027cdb929c266ca3aebe8ad54e (patch) | |
tree | d8d3aa9d3f87bc146b6bcbf72de26205a2cbe08c /Modules/_struct.c | |
parent | d69f973fcf951035db9949734bf07f62eb6435ae (diff) | |
download | cpython-024753e40b985a027cdb929c266ca3aebe8ad54e.tar.gz |
Merged revisions 75283 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r75283 | mark.dickinson | 2009-10-08 16:54:10 +0100 (Thu, 08 Oct 2009) | 4 lines
Issue #7078: _struct.__doc__ was being ignored. Import it into struct.
Also add description of '?' struct format character. Thanks Gabriel
Genellina for the patch.
........
Diffstat (limited to 'Modules/_struct.c')
-rw-r--r-- | Modules/_struct.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Modules/_struct.c b/Modules/_struct.c index 3e0ab31a3d..6a89d8c403 100644 --- a/Modules/_struct.c +++ b/Modules/_struct.c @@ -1900,18 +1900,20 @@ static struct PyMethodDef module_functions[] = { PyDoc_STRVAR(module_doc, "Functions to convert between Python values and C structs.\n\ Python bytes objects are used to hold the data representing the C struct\n\ -and also as format strings to describe the layout of data in the C struct.\n\ +and also as format strings (explained below) to describe the layout of data\n\ +in the C struct.\n\ \n\ The optional first format char indicates byte order, size and alignment:\n\ - @: native order, size & alignment (default)\n\ - =: native order, std. size & alignment\n\ - <: little-endian, std. size & alignment\n\ - >: big-endian, std. size & alignment\n\ - !: same as >\n\ + @: native order, size & alignment (default)\n\ + =: native order, std. size & alignment\n\ + <: little-endian, std. size & alignment\n\ + >: big-endian, std. size & alignment\n\ + !: same as >\n\ \n\ The remaining chars indicate types of args and must match exactly;\n\ these can be preceded by a decimal repeat count:\n\ x: pad byte (no data); c:char; b:signed byte; B:unsigned byte;\n\ + ?: _Bool (requires C99; if not available, char is used instead)\n\ h:short; H:unsigned short; i:int; I:unsigned int;\n\ l:long; L:unsigned long; f:float; d:double.\n\ Special cases (preceding decimal count indicates length):\n\ |