summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Include/unicodeobject.h17
-rw-r--r--Objects/object.c5
-rw-r--r--Objects/stringobject.c5
-rw-r--r--Objects/unicodeobject.c14
-rw-r--r--Python/getargs.c5
5 files changed, 17 insertions, 29 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h
index 871fbed..84cd0c1 100644
--- a/Include/unicodeobject.h
+++ b/Include/unicodeobject.h
@@ -386,6 +386,23 @@ extern DL_IMPORT(int) PyUnicode_AsWideChar(
/* --- Manage the default encoding ---------------------------------------- */
+/* Return a Python string holding the default encoded value of the
+ Unicode object.
+
+ The resulting string is cached in the Unicode object for subsequent
+ usage by this function. The cached version is needed to implement
+ the character buffer interface and will live (at least) as long as
+ the Unicode object itself.
+
+ The refcount of the string is *not* incremented.
+
+ *** Exported for internal use by the interpreter only !!! ***
+
+*/
+
+extern DL_IMPORT(PyObject *) _PyUnicode_AsDefaultEncodedString(
+ PyObject *, const char *);
+
/* Returns the currently active default encoding.
The default encoding is currently implemented as run-time settable
diff --git a/Objects/object.c b/Objects/object.c
index 3349078..87c8e1a 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1056,11 +1056,6 @@ PyObject_SetAttrString(PyObject *v, char *name, PyObject *w)
}
}
-/* Internal API needed by PyObject_GetAttr(): */
-extern
-PyObject *_PyUnicode_AsDefaultEncodedString(PyObject *unicode,
- const char *errors);
-
PyObject *
PyObject_GetAttr(PyObject *v, PyObject *name)
{
diff --git a/Objects/stringobject.c b/Objects/stringobject.c
index 9a88d2f..c7f5062 100644
--- a/Objects/stringobject.c
+++ b/Objects/stringobject.c
@@ -333,11 +333,6 @@ PyString_AsString(register PyObject *op)
return ((PyStringObject *)op) -> ob_sval;
}
-/* Internal API needed by PyString_AsStringAndSize(): */
-extern
-PyObject *_PyUnicode_AsDefaultEncodedString(PyObject *unicode,
- const char *errors);
-
int
PyString_AsStringAndSize(register PyObject *obj,
register char **s,
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 08ba065..4bdff5a 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -566,20 +566,6 @@ PyObject *PyUnicode_AsEncodedString(PyObject *unicode,
return NULL;
}
-/* Return a Python string holding the default encoded value of the
- Unicode object.
-
- The resulting string is cached in the Unicode object for subsequent
- usage by this function. The cached version is needed to implement
- the character buffer interface and will live (at least) as long as
- the Unicode object itself.
-
- The refcount of the string is *not* incremented.
-
- *** Exported for internal use by the interpreter only !!! ***
-
-*/
-
PyObject *_PyUnicode_AsDefaultEncodedString(PyObject *unicode,
const char *errors)
{
diff --git a/Python/getargs.c b/Python/getargs.c
index 8c00b0e..c9a5273 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -359,11 +359,6 @@ convertitem(PyObject *arg, char **p_format, va_list *p_va, int *levels,
-/* Internal API needed by convertsimple() and a helper macro. */
-extern
-PyObject *_PyUnicode_AsDefaultEncodedString(PyObject *unicode,
- const char *errors);
-
#define UNICODE_DEFAULT_ENCODING(arg) \
_PyUnicode_AsDefaultEncodedString(arg, NULL)