summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-02-17 08:14:30 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-02-17 08:14:30 (GMT)
commit483405bcca9f371bc6910dda7f9b5ba74395682c (patch)
tree3afeb1990bf2ab9d24fdea4409317a08a97af7eb /Modules
parent77c041ba64f87ac021c2a7a9314d9a3a1145057f (diff)
downloadcpython-483405bcca9f371bc6910dda7f9b5ba74395682c.zip
cpython-483405bcca9f371bc6910dda7f9b5ba74395682c.tar.gz
cpython-483405bcca9f371bc6910dda7f9b5ba74395682c.tar.bz2
Issue #22883: Got rid of outdated references to PyInt and PyString in comments.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_io/_iomodule.h2
-rw-r--r--Modules/_json.c8
-rw-r--r--Modules/_sqlite/connection.h2
-rw-r--r--Modules/fcntlmodule.c7
-rw-r--r--Modules/itertoolsmodule.c2
5 files changed, 9 insertions, 12 deletions
diff --git a/Modules/_io/_iomodule.h b/Modules/_io/_iomodule.h
index 8927864..9d5205e 100644
--- a/Modules/_io/_iomodule.h
+++ b/Modules/_io/_iomodule.h
@@ -69,7 +69,7 @@ extern int _PyIO_trap_eintr(void);
* Offset type for positioning.
*/
-/* 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
diff --git a/Modules/_json.c b/Modules/_json.c
index 031471e..076859f 100644
--- 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) {
- /* Read a JSON array from PyString pystr.
+ /* Read a JSON array from PyUnicode pystr.
idx is the index of the first character after the opening brace.
*next_idx_ptr is a return-by-reference index to the first character after
the closing brace.
@@ -899,8 +899,8 @@ bail:
}
static PyObject *
-_parse_constant(PyScannerObject *s, char *constant, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {
- /* Read a JSON constant from PyString pystr.
+_parse_constant(PyScannerObject *s, const char *constant, Py_ssize_t idx, Py_ssize_t *next_idx_ptr) {
+ /* Read a JSON constant.
constant is the constant string that was found
("NaN", "Infinity", "-Infinity").
idx is the index of the first character of the constant
@@ -932,7 +932,7 @@ _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_
the number.
Returns a new PyObject representation of that number:
- PyInt, PyLong, or PyFloat.
+ PyLong, or PyFloat.
May return other types if parse_int or parse_float are set
*/
void *str;
diff --git a/Modules/_sqlite/connection.h b/Modules/_sqlite/connection.h
index 0c9734c..fbd9063 100644
--- 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;
- /* None for autocommit, otherwise a PyString with the isolation level */
+ /* None for autocommit, otherwise a PyUnicode with the isolation level */
PyObject* isolation_level;
/* NULL for autocommit, otherwise a string with the BEGIN statement; will be
diff --git a/Modules/fcntlmodule.c b/Modules/fcntlmodule.c
index 1f1cef9..780e222 100644
--- a/Modules/fcntlmodule.c
+++ b/Modules/fcntlmodule.c
@@ -152,11 +152,8 @@ fcntl_ioctl_impl(PyModuleDef *module, int fd, unsigned int code, PyObject *ob_ar
/*[clinic end generated code: output=ad47738c118622bf input=a55a6ee8e494c449]*/
{
#define IOCTL_BUFSZ 1024
- /* We use the unsigned non-checked 'I'
- format for the 'code' parameter because Python turns 0x8000000
- into either a large positive number (PyLong or PyInt on 64-bit
- platforms) or a negative number on others (32-bit PyInt)
- whereas the system expects it to be a 32bit bit field value
+ /* We use the unsigned non-checked 'I' format for the 'code' parameter
+ because the system expects it to be a 32bit bit field value
regardless of it being passed as an int or unsigned long on
various platforms. See the termios.TIOCSWINSZ constant across
platforms for an example of this.
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c
index 1f42022..afff7e4 100644
--- 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.
- assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && long_step==PyInt(1));
+ assert(cnt != PY_SSIZE_T_MAX && long_cnt == NULL && long_step==PyLong(1));
Advances with: cnt += 1
When count hits Y_SSIZE_T_MAX, switch to slow_mode.