Kill PyString_Encode(), which isn't used anywhere.

(We should also kill the other PyString_ encode/decode APIs, but they
still have some users.)
This commit is contained in:
Guido van Rossum 2007-10-26 19:34:40 +00:00
parent 35d02c1649
commit a2074f0bd7
2 changed files with 8 additions and 27 deletions

View File

@ -874,15 +874,6 @@ called with a non-string parameter.
if an exception was raised by the codec.
.. cfunction:: PyObject* PyString_Encode(const char *s, Py_ssize_t size, const char *encoding, const char *errors)
Encode the :ctype:`char` buffer of the given size by passing it to the codec
registered for *encoding* and return a Python object. *encoding* and *errors*
have the same meaning as the parameters of the same name in the string
:meth:`encode` method. The codec to be used is looked up using the Python codec
registry. Return *NULL* if an exception was raised by the codec.
.. cfunction:: PyObject* PyString_AsEncodedObject(PyObject *str, const char *encoding, const char *errors)
Encode a string object using the codec registered for *encoding* and return the

View File

@ -102,16 +102,6 @@ PyAPI_FUNC(PyObject*) PyString_Decode(
const char *errors /* error handling */
);
/* Encodes a char buffer of the given size and returns a
Python object. */
PyAPI_FUNC(PyObject*) PyString_Encode(
const char *s, /* string char buffer */
Py_ssize_t size, /* number of chars to encode */
const char *encoding, /* encoding */
const char *errors /* error handling */
);
/* Encodes a string object and returns the result as Python
object. */