diff options
author | Georg Brandl <georg@python.org> | 2005-11-24 15:37:42 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2005-11-24 15:37:42 (GMT) |
commit | f06e30af4a0b556d2144b6fd473afeddbc21bb2f (patch) | |
tree | 2edf45d64c13319d09d09f22eca6200c1d1e2279 /Doc | |
parent | 9df23ea1fc7cc9325b03c9a4beb7f4852687378f (diff) | |
download | cpython-f06e30af4a0b556d2144b6fd473afeddbc21bb2f.zip cpython-f06e30af4a0b556d2144b6fd473afeddbc21bb2f.tar.gz cpython-f06e30af4a0b556d2144b6fd473afeddbc21bb2f.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. |