summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-26 19:34:40 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-26 19:34:40 (GMT)
commita2074f0bd75b5e08a6f9094dc30c26e2252e3747 (patch)
tree51f98538555526a232fce5e2ea3c3697407a5e50 /Include
parent35d02c1649e577a142e769159b2da9f395e30c29 (diff)
downloadcpython-a2074f0bd75b5e08a6f9094dc30c26e2252e3747.zip
cpython-a2074f0bd75b5e08a6f9094dc30c26e2252e3747.tar.gz
cpython-a2074f0bd75b5e08a6f9094dc30c26e2252e3747.tar.bz2
Kill PyString_Encode(), which isn't used anywhere.
(We should also kill the other PyString_ encode/decode APIs, but they still have some users.)
Diffstat (limited to 'Include')
-rw-r--r--Include/stringobject.h26
1 files changed, 8 insertions, 18 deletions
diff --git a/Include/stringobject.h b/Include/stringobject.h
index 103a9be..223d382 100644
--- a/Include/stringobject.h
+++ b/Include/stringobject.h
@@ -70,7 +70,7 @@ PyAPI_FUNC(int) _PyString_Eq(PyObject *, PyObject*);
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 @@ 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
+/* Encodes a string object and returns the result as Python
object. */
PyAPI_FUNC(PyObject*) PyString_AsEncodedObject(
@@ -122,8 +112,8 @@ PyAPI_FUNC(PyObject*) PyString_AsEncodedObject(
);
/* 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 @@ PyAPI_FUNC(PyObject*) PyString_AsEncodedString(
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 @@ PyAPI_FUNC(PyObject*) PyString_AsDecodedObject(
);
/* 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 @@ PyAPI_FUNC(int) PyString_AsStringAndSize(
(only possible for 0-terminated
strings) */
);
-
+
#ifdef __cplusplus
}