diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 16:40:23 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-27 16:40:23 (GMT) |
commit | 9594942716a8f9c557b85d31751753d89cd7cebf (patch) | |
tree | 847ee3a06cf8831731d4aa0adaee961accc74fda /Include | |
parent | 4af4d273bd2c18e8e3d56dc43a877ce04a5a1e13 (diff) | |
download | cpython-9594942716a8f9c557b85d31751753d89cd7cebf.zip cpython-9594942716a8f9c557b85d31751753d89cd7cebf.tar.gz cpython-9594942716a8f9c557b85d31751753d89cd7cebf.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 44b5af7..c9624f3 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -771,7 +771,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ 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. */ @@ -780,7 +780,7 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ /* 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 bcb93b9..fbe738c 100644 --- a/Include/longobject.h +++ b/Include/longobject.h @@ -113,7 +113,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 @@ -123,7 +123,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, @@ -173,7 +173,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 3d5f509..c6b7df4 100644 --- a/Include/objimpl.h +++ b/Include/objimpl.h @@ -171,7 +171,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 e4e3601..a5edea9 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 |