mirror of
https://github.com/python/cpython.git
synced 2025-07-30 22:54:16 +00:00
After discussing some more with Georg, do no migrate versionchanged:: 2.5 to
this branch. While I am here, also get rid of other versionchanged:: 2.x constructs, as discussed.
This commit is contained in:
parent
7b6ca4ab7f
commit
b70ccc348b
19 changed files with 3 additions and 360 deletions
|
@ -65,20 +65,12 @@ access internal read-only data of Unicode objects:
|
|||
Return the size of the object. *o* has to be a :ctype:`PyUnicodeObject` (not
|
||||
checked).
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function returned an :ctype:`int` type. This might require changes
|
||||
in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: Py_ssize_t PyUnicode_GET_DATA_SIZE(PyObject *o)
|
||||
|
||||
Return the size of the object's internal buffer in bytes. *o* has to be a
|
||||
:ctype:`PyUnicodeObject` (not checked).
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function returned an :ctype:`int` type. This might require changes
|
||||
in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: Py_UNICODE* PyUnicode_AS_UNICODE(PyObject *o)
|
||||
|
||||
|
@ -214,9 +206,6 @@ APIs:
|
|||
Therefore, modification of the resulting Unicode object is only allowed when *u*
|
||||
is *NULL*.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_FromStringAndSize(const char *u, Py_ssize_t size)
|
||||
|
||||
|
@ -328,10 +317,6 @@ APIs:
|
|||
|
||||
Return the length of the Unicode object.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function returned an :ctype:`int` type. This might require changes
|
||||
in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_FromEncodedObject(PyObject *obj, const char *encoding, const char *errors)
|
||||
|
||||
|
@ -370,10 +355,6 @@ the system's :ctype:`wchar_t`.
|
|||
using wcslen.
|
||||
Return *NULL* on failure.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: Py_ssize_t PyUnicode_AsWideChar(PyUnicodeObject *unicode, wchar_t *w, Py_ssize_t size)
|
||||
|
||||
|
@ -385,11 +366,6 @@ the system's :ctype:`wchar_t`.
|
|||
to make sure that the :ctype:`wchar_t` string is 0-terminated in case this is
|
||||
required by the application.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function returned an :ctype:`int` type and used an :ctype:`int`
|
||||
type for *size*. This might require changes in your code for properly
|
||||
supporting 64-bit systems.
|
||||
|
||||
|
||||
.. _builtincodecs:
|
||||
|
||||
|
@ -429,10 +405,6 @@ These are the generic codec APIs:
|
|||
using the Python codec registry. Return *NULL* if an exception was raised by
|
||||
the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_Encode(const Py_UNICODE *s, Py_ssize_t size, const char *encoding, const char *errors)
|
||||
|
||||
|
@ -442,10 +414,6 @@ These are the generic codec APIs:
|
|||
to be used is looked up using the Python codec registry. Return *NULL* if an
|
||||
exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsEncodedString(PyObject *unicode, const char *encoding, const char *errors)
|
||||
|
||||
|
@ -465,10 +433,6 @@ These are the UTF-8 codec APIs:
|
|||
Create a Unicode object by decoding *size* bytes of the UTF-8 encoded string
|
||||
*s*. Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_DecodeUTF8Stateful(const char *s, Py_ssize_t size, const char *errors, Py_ssize_t *consumed)
|
||||
|
||||
|
@ -477,10 +441,6 @@ These are the UTF-8 codec APIs:
|
|||
treated as an error. Those bytes will not be decoded and the number of bytes
|
||||
that have been decoded will be stored in *consumed*.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeUTF8(const Py_UNICODE *s, Py_ssize_t size, const char *errors)
|
||||
|
||||
|
@ -488,10 +448,6 @@ These are the UTF-8 codec APIs:
|
|||
return a Python bytes object. Return *NULL* if an exception was raised by
|
||||
the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsUTF8String(PyObject *unicode)
|
||||
|
||||
|
@ -591,10 +547,6 @@ These are the UTF-16 codec APIs:
|
|||
|
||||
Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_DecodeUTF16Stateful(const char *s, Py_ssize_t size, const char *errors, int *byteorder, Py_ssize_t *consumed)
|
||||
|
||||
|
@ -604,11 +556,6 @@ These are the UTF-16 codec APIs:
|
|||
split surrogate pair) as an error. Those bytes will not be decoded and the
|
||||
number of bytes that have been decoded will be stored in *consumed*.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size* and an :ctype:`int *`
|
||||
type for *consumed*. This might require changes in your code for
|
||||
properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeUTF16(const Py_UNICODE *s, Py_ssize_t size, const char *errors, int byteorder)
|
||||
|
||||
|
@ -629,10 +576,6 @@ These are the UTF-16 codec APIs:
|
|||
|
||||
Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsUTF16String(PyObject *unicode)
|
||||
|
||||
|
@ -650,10 +593,6 @@ These are the "Unicode Escape" codec APIs:
|
|||
Create a Unicode object by decoding *size* bytes of the Unicode-Escape encoded
|
||||
string *s*. Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeUnicodeEscape(const Py_UNICODE *s, Py_ssize_t size)
|
||||
|
||||
|
@ -661,10 +600,6 @@ These are the "Unicode Escape" codec APIs:
|
|||
return a Python string object. Return *NULL* if an exception was raised by the
|
||||
codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsUnicodeEscapeString(PyObject *unicode)
|
||||
|
||||
|
@ -682,10 +617,6 @@ These are the "Raw Unicode Escape" codec APIs:
|
|||
Create a Unicode object by decoding *size* bytes of the Raw-Unicode-Escape
|
||||
encoded string *s*. Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeRawUnicodeEscape(const Py_UNICODE *s, Py_ssize_t size, const char *errors)
|
||||
|
||||
|
@ -693,10 +624,6 @@ These are the "Raw Unicode Escape" codec APIs:
|
|||
and return a Python string object. Return *NULL* if an exception was raised by
|
||||
the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsRawUnicodeEscapeString(PyObject *unicode)
|
||||
|
||||
|
@ -715,10 +642,6 @@ ordinals and only these are accepted by the codecs during encoding.
|
|||
Create a Unicode object by decoding *size* bytes of the Latin-1 encoded string
|
||||
*s*. Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeLatin1(const Py_UNICODE *s, Py_ssize_t size, const char *errors)
|
||||
|
||||
|
@ -726,10 +649,6 @@ ordinals and only these are accepted by the codecs during encoding.
|
|||
return a Python bytes object. Return *NULL* if an exception was raised by
|
||||
the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsLatin1String(PyObject *unicode)
|
||||
|
||||
|
@ -748,10 +667,6 @@ codes generate errors.
|
|||
Create a Unicode object by decoding *size* bytes of the ASCII encoded string
|
||||
*s*. Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeASCII(const Py_UNICODE *s, Py_ssize_t size, const char *errors)
|
||||
|
||||
|
@ -759,10 +674,6 @@ codes generate errors.
|
|||
return a Python bytes object. Return *NULL* if an exception was raised by
|
||||
the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsASCIIString(PyObject *unicode)
|
||||
|
||||
|
@ -805,10 +716,6 @@ characters to different code points.
|
|||
Byte values greater that the length of the string and U+FFFE "characters" are
|
||||
treated as "undefined mapping".
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_EncodeCharmap(const Py_UNICODE *s, Py_ssize_t size, PyObject *mapping, const char *errors)
|
||||
|
||||
|
@ -816,10 +723,6 @@ characters to different code points.
|
|||
*mapping* object and return a Python string object. Return *NULL* if an
|
||||
exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsCharmapString(PyObject *unicode, PyObject *mapping)
|
||||
|
||||
|
@ -843,9 +746,6 @@ The following codec API is special in that maps Unicode to Unicode.
|
|||
and sequences work well. Unmapped character ordinals (ones which cause a
|
||||
:exc:`LookupError`) are left untouched and are copied as-is.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
These are the MBCS codec APIs. They are currently only available on Windows and
|
||||
use the Win32 MBCS converters to implement the conversions. Note that MBCS (or
|
||||
|
@ -860,10 +760,6 @@ the user settings on the machine running the codec.
|
|||
Create a Unicode object by decoding *size* bytes of the MBCS encoded string *s*.
|
||||
Return *NULL* if an exception was raised by the codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_DecodeMBCSStateful(const char *s, int size, const char *errors, int *consumed)
|
||||
|
||||
|
@ -879,10 +775,6 @@ the user settings on the machine running the codec.
|
|||
a Python bytes object. Return *NULL* if an exception was raised by the
|
||||
codec.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *size*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_AsMBCSString(PyObject *unicode)
|
||||
|
||||
|
@ -917,10 +809,6 @@ They all return *NULL* or ``-1`` if an exception occurs.
|
|||
separator. At most *maxsplit* splits will be done. If negative, no limit is
|
||||
set. Separators are not included in the resulting list.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *maxsplit*. This might require
|
||||
changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_Splitlines(PyObject *s, int keepend)
|
||||
|
||||
|
@ -957,11 +845,6 @@ They all return *NULL* or ``-1`` if an exception occurs.
|
|||
(*direction* == -1 means to do a prefix match, *direction* == 1 a suffix match),
|
||||
0 otherwise. Return ``-1`` if an error occurred.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *start* and *end*. This
|
||||
might require changes in your code for properly supporting 64-bit
|
||||
systems.
|
||||
|
||||
|
||||
.. cfunction:: Py_ssize_t PyUnicode_Find(PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end, int direction)
|
||||
|
||||
|
@ -971,22 +854,12 @@ They all return *NULL* or ``-1`` if an exception occurs.
|
|||
``-1`` indicates that no match was found, and ``-2`` indicates that an error
|
||||
occurred and an exception has been set.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *start* and *end*. This
|
||||
might require changes in your code for properly supporting 64-bit
|
||||
systems.
|
||||
|
||||
|
||||
.. cfunction:: Py_ssize_t PyUnicode_Count(PyObject *str, PyObject *substr, Py_ssize_t start, Py_ssize_t end)
|
||||
|
||||
Return the number of non-overlapping occurrences of *substr* in
|
||||
``str[start:end]``. Return ``-1`` if an error occurred.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function returned an :ctype:`int` type and used an :ctype:`int`
|
||||
type for *start* and *end*. This might require changes in your code for
|
||||
properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: PyObject* PyUnicode_Replace(PyObject *str, PyObject *substr, PyObject *replstr, Py_ssize_t maxcount)
|
||||
|
||||
|
@ -994,10 +867,6 @@ They all return *NULL* or ``-1`` if an exception occurs.
|
|||
return the resulting Unicode object. *maxcount* == -1 means replace all
|
||||
occurrences.
|
||||
|
||||
.. versionchanged:: 2.5
|
||||
This function used an :ctype:`int` type for *maxcount*. This might
|
||||
require changes in your code for properly supporting 64-bit systems.
|
||||
|
||||
|
||||
.. cfunction:: int PyUnicode_Compare(PyObject *left, PyObject *right)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue