]> granicus.if.org Git - python/commitdiff
Issue #22883: Got rid of outdated references to PyInt and PyString in comments.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 17 Feb 2015 08:14:30 +0000 (10:14 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 17 Feb 2015 08:14:30 +0000 (10:14 +0200)
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

index cf1279dc68bc389a2fd7f2448f147c1f969c40bb..71472cd163cb18d8d9fc9325c9d09f92a287f5be 100644 (file)
@@ -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
index 8927864e8c002d2a2593287beb362a79c55e4898..9d5205ec3051b231a753833e204704bf11d3cdca 100644 (file)
@@ -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
index 031471e4f81f9cd368308406da0e073341d49b3f..076859f99cd93bf13c59935137790882703f77a8 100644 (file)
@@ -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;
index 0c9734caf710c6363518bb66a271cefca7398959..fbd906377952c9f9588fb93ebf81c2686b54416f 100644 (file)
@@ -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
index 1f1cef90eb22ce5add7248e54869df1503b6b687..780e2222c56545edeae88095a17f13e34140171f 100644 (file)
@@ -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.
index 1f42022fd58745bd4db963f728d0455b277be0e9..afff7e4aa87125e4cd1f9847dff49734297e608d 100644 (file)
@@ -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.
 
index e09ff3423c37d9e228d2dafcafaa23722590ec6f..5cefdcf088bed7bbd6f89dafcef9d8f24c4ead4f 100644 (file)
@@ -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.