cpython: 2f0c1937d716 (original) (raw)

Mercurial > cpython

changeset 94660:2f0c1937d716

Issue #22883: Got rid of outdated references to PyInt and PyString in comments. [#22883]

Serhiy Storchaka storchaka@gmail.com
date Tue, 17 Feb 2015 10:14:30 +0200
parents 534b26837a13
children c0b2dacef35c
files Lib/test/test_getargs2.py Modules/_io/_iomodule.h Modules/_json.c Modules/_sqlite/connection.h Modules/fcntlmodule.c Modules/itertoolsmodule.c Python/ceval.c
diffstat 7 files changed, 12 insertions(+), 15 deletions(-)[+] [-] Lib/test/test_getargs2.py 4 Modules/_io/_iomodule.h 2 Modules/_json.c 8 Modules/_sqlite/connection.h 2 Modules/fcntlmodule.c 7 Modules/itertoolsmodule.c 2 Python/ceval.c 2

line wrap: on

line diff

--- a/Lib/test/test_getargs2.py +++ b/Lib/test/test_getargs2.py @@ -34,8 +34,8 @@ except ImportError:

> ** Changed from previous "range-and-a-half" to "none"; the

> range-and-a-half checking wasn't particularly useful.

# -# Plus a C API or two, e.g. PyInt_AsLongMask() -> -# unsigned long and PyInt_AsLongLongMask() -> unsigned +# Plus a C API or two, e.g. PyLong_AsUnsignedLongMask() -> +# unsigned long and PyLong_AsUnsignedLongLongMask() -> unsigned

long long (if that exists).

LARGE = 0x7FFFFFFF

--- a/Modules/_io/_iomodule.h +++ b/Modules/_io/_iomodule.h @@ -69,7 +69,7 @@ extern int _PyIO_trap_eintr(void);

-/* Printing a variable of type off_t (with e.g., PyString_FromFormat) +/* Printing a variable of type off_t (with e.g., PyUnicode_FromFormat) correctly and without producing compiler warnings is surprisingly painful. We identify an integer type whose size matches off_t and then: (1) cast the off_t to that integer type and (2) use the appropriate conversion

--- a/Modules/_json.c +++ b/Modules/_json.c @@ -827,7 +827,7 @@ bail: static PyObject * _parse_array_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {

@@ -899,8 +899,8 @@ bail: } static PyObject * -_parse_constant(PyScannerObject *s, char *constant, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {

+_parse_constant(PyScannerObject *s, const char *constant, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {

Returns a new PyObject representation of that number:

--- a/Modules/_sqlite/connection.h +++ b/Modules/_sqlite/connection.h @@ -52,7 +52,7 @@ typedef struct * first get called with count=0? */ double timeout_started;

--- a/Modules/fcntlmodule.c +++ b/Modules/fcntlmodule.c @@ -152,11 +152,8 @@ fcntl_ioctl_impl(PyModuleDef module, in /[clinic end generated code: output=ad47738c118622bf input=a55a6ee8e494c449]*/ { #define IOCTL_BUFSZ 1024

--- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -3874,7 +3874,7 @@ typedef struct { fast_mode: when cnt an integer < PY_SSIZE_T_MAX and no step is specified.

--- a/Python/ceval.c +++ b/Python/ceval.c @@ -4606,7 +4606,7 @@ ext_call_fail: return result; } -/* Extract a slice index from a PyInt or PyLong or an object with the +/* Extract a slice index from a PyLong or an object with the nb_index slot defined, and store in *pi. Silently reduce values larger than PY_SSIZE_T_MAX to PY_SSIZE_T_MAX, and silently boost values less than -PY_SSIZE_T_MAX-1 to -PY_SSIZE_T_MAX-1.