Mercurial > cpython-lru_cache-weakref
diff Include/stringobject.h @ 43692:50a3475db466
Kill PyString_Encode(), which isn't used anywhere.
(We should also kill the other PyString_ encode/decode APIs, but they
still have some users.)
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 26 Oct 2007 19:34:40 +0000 |
| parents | ace45b361e87 |
| children | 0d462d789b18 |
line wrap: on
line diff
--- a/Include/stringobject.h Fri Oct 26 18:43:10 2007 +0000 +++ b/Include/stringobject.h Fri Oct 26 19:34:40 2007 +0000 @@ -70,7 +70,7 @@ PyAPI_FUNC(PyObject *) PyString_Format(PyObject *, PyObject *); PyAPI_FUNC(PyObject *) _PyString_FormatLong(PyObject*, int, int, int, char**, int*); -PyAPI_FUNC(PyObject *) PyString_DecodeEscape(const char *, Py_ssize_t, +PyAPI_FUNC(PyObject *) PyString_DecodeEscape(const char *, Py_ssize_t, const char *, Py_ssize_t, const char *); @@ -102,17 +102,7 @@ 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 +/* Encodes a string object and returns the result as Python object. */ PyAPI_FUNC(PyObject*) PyString_AsEncodedObject( @@ -122,8 +112,8 @@ ); /* Encodes a string object and returns the result as Python string - object. - + object. + If the codec returns an Unicode object, the object is converted back to a string using the default encoding. @@ -135,7 +125,7 @@ const char *errors /* error handling */ ); -/* Decodes a string object and returns the result as Python +/* Decodes a string object and returns the result as Python object. */ PyAPI_FUNC(PyObject*) PyString_AsDecodedObject( @@ -145,8 +135,8 @@ ); /* Decodes a string object and returns the result as Python string - object. - + object. + If the codec returns an Unicode object, the object is converted back to a string using the default encoding. @@ -171,7 +161,7 @@ (only possible for 0-terminated strings) */ ); - + #ifdef __cplusplus }
