diff options
author | Georg Brandl <georg@python.org> | 2005-11-24 15:38:54 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-11-24 15:38:54 (GMT) |
commit | b9c3283cc0e0b28231080d8e8ca023de5cb618ff (patch) | |
tree | 45af3543b6dcda21da5240807744be7057f1f3f8 /Doc | |
parent | cfced277da25701300b5aeb3fde0f563ed456eab (diff) | |
download | cpython-b9c3283cc0e0b28231080d8e8ca023de5cb618ff.zip cpython-b9c3283cc0e0b28231080d8e8ca023de5cb618ff.tar.gz cpython-b9c3283cc0e0b28231080d8e8ca023de5cb618ff.tar.bz2 |
bug #1281408: make Py_BuildValue work with unsigned longs and long longs
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/api/utilities.tex | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/Doc/api/utilities.tex b/Doc/api/utilities.tex index 12216f2..78526b8 100644 --- a/Doc/api/utilities.tex +++ b/Doc/api/utilities.tex @@ -836,14 +836,36 @@ PyArg_ParseTuple(args, "O|O:ref", &object, &callback) Convert a plain C \ctype{int} to a Python integer object. \item[\samp{b} (integer) {[char]}] - Same as \samp{i}. + Convert a plain C \ctype{char} to a Python integer object. \item[\samp{h} (integer) {[short int]}] - Same as \samp{i}. + Convert a plain C \ctype{short int} to a Python integer object. \item[\samp{l} (integer) {[long int]}] Convert a C \ctype{long int} to a Python integer object. + \item[\samp{B} (integer) {[unsigned char]}] + Convert a C \ctype{unsigned char} to a Python integer object. + + \item[\samp{H} (integer) {[unsigned short int]}] + Convert a C \ctype{unsigned short int} to a Python integer object. + + \item[\samp{I} (integer/long) {[unsigned int]}] + Convert a C \ctype{unsigned int} to a Python integer object + or a Python long integer object, if it is larger than \code{sys.maxint}. + + \item[\samp{k} (integer/long) {[unsigned long]}] + Convert a C \ctype{unsigned long} to a Python integer object + or a Python long integer object, if it is larger than \code{sys.maxint}. + + \item[\samp{L} (long) {[PY_LONG_LONG]}] + Convert a C \ctype{long long} to a Python long integer object. Only + available on platforms that support \ctype{long long}. + + \item[\samp{K} (long) {[unsigned PY_LONG_LONG]}] + Convert a C \ctype{unsigned long long} to a Python long integer object. + Only available on platforms that support \ctype{unsigned long long}. + \item[\samp{c} (string of length 1) {[char]}] Convert a C \ctype{int} representing a character to a Python string of length 1. |