summaryrefslogtreecommitdiff
path: root/Include/intobject.h
diff options
context:
space:
mode:
authorThomas Heller <theller@ctypes.org>2003-04-17 18:55:45 +0000
committerThomas Heller <theller@ctypes.org>2003-04-17 18:55:45 +0000
commit8918456ec400a2ea60452ae49c780f496207143d (patch)
tree9b0ce3f7bd13d0aa34c3bfbcc63578d3871f2525 /Include/intobject.h
parentbd8d0ed849f4b09ace911d2195769cac70a4e0e6 (diff)
downloadcpython-8918456ec400a2ea60452ae49c780f496207143d.tar.gz
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/intobject.h')
-rw-r--r--Include/intobject.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/intobject.h b/Include/intobject.h
index ab936b2615..61ef0f0f52 100644
--- a/Include/intobject.h
+++ b/Include/intobject.h
@@ -36,6 +36,11 @@ PyAPI_FUNC(PyObject *) PyInt_FromUnicode(Py_UNICODE*, int, int);
#endif
PyAPI_FUNC(PyObject *) PyInt_FromLong(long);
PyAPI_FUNC(long) PyInt_AsLong(PyObject *);
+PyAPI_FUNC(unsigned long) PyInt_AsUnsignedLongMask(PyObject *);
+#ifdef HAVE_LONG_LONG
+PyAPI_FUNC(unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
+#endif
+
PyAPI_FUNC(long) PyInt_GetMax(void);
/* Macro, trading safety for speed */