diff options
author | Thomas Heller <theller@ctypes.org> | 2003-04-17 18:55:45 (GMT) |
---|---|---|
committer | Thomas Heller <theller@ctypes.org> | 2003-04-17 18:55:45 (GMT) |
commit | a4ea603b055533e71920a088acb1c106e4895dbd (patch) | |
tree | c50efc24264738dee727367ed0e55bc3e6aedf84 /Include/longobject.h | |
parent | e13ddc9ec85287b17fd03454f836f495c1167de9 (diff) | |
download | cpython-a4ea603b055533e71920a088acb1c106e4895dbd.zip cpython-a4ea603b055533e71920a088acb1c106e4895dbd.tar.gz cpython-a4ea603b055533e71920a088acb1c106e4895dbd.tar.bz2 |
SF # 595026: support for masks in getargs.c.
New functions:
unsigned long PyInt_AsUnsignedLongMask(PyObject *);
unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
unsigned long PyLong_AsUnsignedLongMask(PyObject *);
unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);
New and changed format codes:
b unsigned char 0..UCHAR_MAX
B unsigned char none **
h unsigned short 0..USHRT_MAX
H unsigned short none **
i int INT_MIN..INT_MAX
I * unsigned int 0..UINT_MAX
l long LONG_MIN..LONG_MAX
k * unsigned long none
L long long LLONG_MIN..LLONG_MAX
K * unsigned long long none
Notes:
* New format codes.
** Changed from previous "range-and-a-half" to "none"; the
range-and-a-half checking wasn't particularly useful.
New test test_getargs2.py, to verify all this.
Diffstat (limited to 'Include/longobject.h')
-rw-r--r-- | Include/longobject.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Include/longobject.h b/Include/longobject.h index 63ca113..8354963 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -19,6 +19,7 @@ PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLong(unsigned long); PyAPI_FUNC(PyObject *) PyLong_FromDouble(double); PyAPI_FUNC(long) PyLong_AsLong(PyObject *); PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *); +PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *); /* _PyLong_AsScaledDouble returns a double x and an exponent e such that the true value is approximately equal to x * 2**(SHIFT*e). e is >= 0. @@ -37,6 +38,7 @@ PyAPI_FUNC(PyObject *) PyLong_FromLongLong(PY_LONG_LONG); PyAPI_FUNC(PyObject *) PyLong_FromUnsignedLongLong(unsigned PY_LONG_LONG); PyAPI_FUNC(PY_LONG_LONG) PyLong_AsLongLong(PyObject *); PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLong(PyObject *); +PyAPI_FUNC(unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *); #endif /* HAVE_LONG_LONG */ PyAPI_FUNC(PyObject *) PyLong_FromString(char *, char **, int); |