diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 17:17:03 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 17:17:03 (GMT) |
commit | 46e1ce214b5711e8dae63a1b5a0a7aafb371baf0 (patch) | |
tree | 0230554f5bd4df8804946f5bb0634cefdbbbd2ae /Include | |
parent | 14e461d5b92000ec4e89182fa25ab0d5b5b31234 (diff) | |
parent | 9594942716a8f9c557b85d31751753d89cd7cebf (diff) | |
download | cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.zip cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.tar.gz cpython-46e1ce214b5711e8dae63a1b5a0a7aafb371baf0.tar.bz2 |
Issue #18783: Removed existing mentions of Python long type in docstrings,
error messages and comments.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 4 | ||||
-rw-r--r-- | Include/longintrepr.h | 6 | ||||
-rw-r--r-- | Include/longobject.h | 6 | ||||
-rw-r--r-- | Include/objimpl.h | 2 | ||||
-rw-r--r-- | Include/pyport.h | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 6516bfe..a1f0595 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -776,7 +776,7 @@ PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t); PyAPI_FUNC(PyObject *) PyNumber_Index(PyObject *o); /* - Returns the object converted to a Python long or int + Returns the object converted to a Python int or NULL with an error raised on failure. */ @@ -785,7 +785,7 @@ PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t); /* Returns the object converted to Py_ssize_t by going through PyNumber_Index first. If an overflow error occurs while - converting the int-or-long to Py_ssize_t, then the second argument + converting the int to Py_ssize_t, then the second argument is the error-type to return. If it is NULL, then the overflow error is cleared and the value is clipped. */ diff --git a/Include/longintrepr.h b/Include/longintrepr.h index 3a45bad..bbba4d8 100644 --- a/Include/longintrepr.h +++ b/Include/longintrepr.h @@ -8,7 +8,7 @@ extern "C" { /* This is published for the benefit of "friends" marshal.c and _decimal.c. */ -/* Parameters of the long integer representation. There are two different +/* Parameters of the integer representation. There are two different sets of parameters: one set for 30-bit digits, stored in an unsigned 32-bit integer type, and one set for 15-bit digits with each digit stored in an unsigned short. The value of PYLONG_BITS_IN_DIGIT, defined either at @@ -29,7 +29,7 @@ extern "C" { of bits in an unsigned long, as do the PyLong <-> long (or unsigned long) conversion functions - - the long <-> size_t/Py_ssize_t conversion functions expect that + - the Python int <-> size_t/Py_ssize_t conversion functions expect that PyLong_SHIFT is strictly less than the number of bits in a size_t - the marshal code currently expects that PyLong_SHIFT is a multiple of 15 @@ -83,7 +83,7 @@ typedef long stwodigits; /* signed variant of twodigits */ so that ob_digit[0] ... ob_digit[abs(ob_size)-1] are actually available. CAUTION: Generic code manipulating subtypes of PyVarObject has to - aware that longs abuse ob_size's sign bit. + aware that ints abuse ob_size's sign bit. */ struct _longobject { diff --git a/Include/longobject.h b/Include/longobject.h index 24cf401..e62d954 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -126,7 +126,7 @@ PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v); PyAPI_FUNC(PyObject *) _PyLong_DivmodNear(PyObject *, PyObject *); /* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in - base 256, and return a Python long with the same numeric value. + base 256, and return a Python int with the same numeric value. If n is 0, the integer is 0. Else: If little_endian is 1/true, bytes[n-1] is the MSB and bytes[0] the LSB; else (little_endian is 0/false) bytes[0] is the MSB and bytes[n-1] the @@ -136,7 +136,7 @@ PyAPI_FUNC(PyObject *) _PyLong_DivmodNear(PyObject *, PyObject *); non-negative if bit 0x80 of the MSB is clear, negative if set. Error returns: + Return NULL with the appropriate exception set if there's not - enough memory to create the Python long. + enough memory to create the Python int. */ PyAPI_FUNC(PyObject *) _PyLong_FromByteArray( const unsigned char* bytes, size_t n, @@ -186,7 +186,7 @@ PyAPI_FUNC(int) _PyLong_FormatAdvancedWriter( Py_ssize_t end); #endif /* Py_LIMITED_API */ -/* These aren't really part of the long object, but they're handy. The +/* These aren't really part of the int object, but they're handy. The functions are in Python/mystrtoul.c. */ PyAPI_FUNC(unsigned long) PyOS_strtoul(char *, char **, int); diff --git a/Include/objimpl.h b/Include/objimpl.h index 264c120..9a27ec3 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -147,7 +147,7 @@ PyAPI_FUNC(PyVarObject *) _PyObject_NewVar(PyTypeObject *, Py_ssize_t); value is rounded up to the closest multiple of sizeof(void *), in order to ensure that pointer fields at the end of the object are correctly aligned for the platform (this is of special importance for subclasses of, e.g., - str or long, so that pointers can be stored after the embedded data). + str or int, so that pointers can be stored after the embedded data). Note that there's no memory wastage in doing this, as malloc has to return (at worst) pointer-aligned memory anyway. diff --git a/Include/pyport.h b/Include/pyport.h index acb6d5d..ca20b22 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -80,7 +80,7 @@ Used in: PY_LONG_LONG #endif #endif /* HAVE_LONG_LONG */ -/* a build with 30-bit digits for Python long integers needs an exact-width +/* a build with 30-bit digits for Python integers needs an exact-width * 32-bit unsigned integer type to store those digits. (We could just use * type 'unsigned long', but that would be wasteful on a system where longs * are 64-bits.) On Unix systems, the autoconf macro AC_TYPE_UINT32_T defines @@ -98,7 +98,7 @@ Used in: PY_LONG_LONG #endif /* Macros for a 64-bit unsigned integer type; used for type 'twodigits' in the - * long integer implementation, when 30-bit digits are enabled. + * integer implementation, when 30-bit digits are enabled. */ #ifdef uint64_t #define HAVE_UINT64_T 1 |