And remove all the extern decls in the middle of .c files.
Apparently, it was excluded from the header file because it is
intended for internal use by the interpreter. It's still intended for
internal use and documented as such in the header file.
/* --- 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
}
}
-/* Internal API needed by PyObject_GetAttr(): */
-extern
-PyObject *_PyUnicode_AsDefaultEncodedString(PyObject *unicode,
- const char *errors);
-
PyObject *
PyObject_GetAttr(PyObject *v, PyObject *name)
{
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,
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)
{
-/* 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)