Rename PyUnicode_AsString -> _PyUnicode_AsString and
PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark
them for interpreter internal use only.

We'll have to rework these APIs or create new ones for the
purpose of accessing the UTF-8 representation of Unicode objects
for 3.1.
diff --git a/Python/_warnings.c b/Python/_warnings.c
index cb81b07..fd3f629 100644
--- a/Python/_warnings.c
+++ b/Python/_warnings.c
@@ -132,7 +132,7 @@
             return NULL;
 
         if (good_msg && is_subclass && good_mod && (ln == 0 || lineno == ln))
-            return PyUnicode_AsString(action);
+            return _PyUnicode_AsString(action);
     }
 
     m = PyImport_ImportModule(MODULE_NAME);
@@ -144,7 +144,7 @@
         return NULL;
     action = PyDict_GetItemString(d, DEFAULT_ACTION_NAME);
     if (action != NULL)
-        return PyUnicode_AsString(action);
+        return _PyUnicode_AsString(action);
 
     PyErr_SetString(PyExc_ValueError,
                     MODULE_NAME "." DEFAULT_ACTION_NAME " not found");
@@ -186,7 +186,7 @@
     else if (rc == 0)
         return PyUnicode_FromString("<unknown>");
 
-    mod_str = PyUnicode_AsString(filename);
+    mod_str = _PyUnicode_AsString(filename);
     if (mod_str == NULL)
 	    return NULL;
     len = PyUnicode_GetSize(filename);
@@ -257,7 +257,7 @@
 
     /* Print "  source_line\n" */
     if (sourceline) {
-        char *source_line_str = PyUnicode_AsString(sourceline);
+        char *source_line_str = _PyUnicode_AsString(sourceline);
         while (*source_line_str == ' ' || *source_line_str == '\t' ||
                 *source_line_str == '\014')
             source_line_str++;
@@ -266,7 +266,7 @@
         PyFile_WriteString("\n", f_stderr);
     }
     else
-        _Py_DisplaySourceLine(f_stderr, PyUnicode_AsString(filename),
+        _Py_DisplaySourceLine(f_stderr, _PyUnicode_AsString(filename),
                               lineno, 2);
     PyErr_Clear();
 }
@@ -367,7 +367,7 @@
             const char *err_str = "???";
 
             if (to_str != NULL)
-                err_str = PyUnicode_AsString(to_str);
+                err_str = _PyUnicode_AsString(to_str);
             PyErr_Format(PyExc_RuntimeError,
                         "Unrecognized action (%s) in warnings.filters:\n %s",
                         action, err_str);
@@ -388,7 +388,7 @@
         else {
             const char *msg = "functions overriding warnings.showwarning() "
                                 "must support the 'line' argument";
-            const char *text_char = PyUnicode_AsString(text);
+            const char *text_char = _PyUnicode_AsString(text);
 
             if (strcmp(msg, text_char) == 0) {
                 /* Prevent infinite recursion by using built-in implementation
@@ -503,7 +503,7 @@
     *filename = PyDict_GetItemString(globals, "__file__");
     if (*filename != NULL) {
         Py_ssize_t len = PyUnicode_GetSize(*filename);
-        const char *file_str = PyUnicode_AsString(*filename);
+        const char *file_str = _PyUnicode_AsString(*filename);
 	    if (file_str == NULL || (len < 0 && PyErr_Occurred()))
             goto handle_error;
 
@@ -523,7 +523,7 @@
             Py_INCREF(*filename);
     }
     else {
-        const char *module_str = PyUnicode_AsString(*module);
+        const char *module_str = _PyUnicode_AsString(*module);
         if (module_str && strcmp(module_str, "__main__") == 0) {
             PyObject *argv = PySys_GetObject("argv");
             if (argv != NULL && PyList_Size(argv) > 0) {
diff --git a/Python/ast.c b/Python/ast.c
index 9adb5a2..46bfd4e 100644
--- a/Python/ast.c
+++ b/Python/ast.c
@@ -1324,7 +1324,7 @@
                 if (errstr) {
                     char *s = "";
                     char buf[128];
-                    s = PyUnicode_AsString(errstr);
+                    s = _PyUnicode_AsString(errstr);
                     PyOS_snprintf(buf, sizeof(buf), "(unicode error) %s", s);
                     ast_error(n, buf);
                 } else {
diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c
index 27a3d8c..ae7ceec 100644
--- a/Python/bltinmodule.c
+++ b/Python/bltinmodule.c
@@ -1606,7 +1606,7 @@
 				Py_DECREF(stdin_encoding);
 				return NULL;
 			}
-			prompt = PyUnicode_AsString(po);
+			prompt = _PyUnicode_AsString(po);
 			if (prompt == NULL) {
 				Py_DECREF(stdin_encoding);
 				Py_DECREF(po);
@@ -1639,7 +1639,7 @@
 			else {
 				result = PyUnicode_Decode
 					(s, len-1,
-					 PyUnicode_AsString(stdin_encoding),
+					 _PyUnicode_AsString(stdin_encoding),
 					 NULL);
 			}
 		}
diff --git a/Python/ceval.c b/Python/ceval.c
index af7a67a..40ce038 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -859,7 +859,7 @@
 	lltrace = PyDict_GetItemString(f->f_globals, "__lltrace__") != NULL;
 #endif
 #if defined(Py_DEBUG) || defined(LLTRACE)
-	filename = PyUnicode_AsString(co->co_filename);
+	filename = _PyUnicode_AsString(co->co_filename);
 #endif
 
 	why = WHY_NOT;
@@ -3291,7 +3291,7 @@
 	if (PyMethod_Check(func))
 		return PyEval_GetFuncName(PyMethod_GET_FUNCTION(func));
 	else if (PyFunction_Check(func))
-		return PyUnicode_AsString(((PyFunctionObject*)func)->func_name);
+		return _PyUnicode_AsString(((PyFunctionObject*)func)->func_name);
 	else if (PyCFunction_Check(func))
 		return ((PyCFunctionObject*)func)->m_ml->ml_name;
 	else
@@ -3527,7 +3527,7 @@
 				     "for keyword argument '%.200s'",
 				     PyEval_GetFuncName(func),
 				     PyEval_GetFuncDesc(func),
-				     PyUnicode_AsString(key));
+				     _PyUnicode_AsString(key));
 			Py_DECREF(key);
 			Py_DECREF(value);
 			Py_DECREF(kwdict);
@@ -3874,7 +3874,7 @@
 	if (!obj)
 		return;
 
-	obj_str = PyUnicode_AsString(obj);
+	obj_str = _PyUnicode_AsString(obj);
 	if (!obj_str)
 		return;
 
diff --git a/Python/compile.c b/Python/compile.c
index 942ca1f52..4600589 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -1300,7 +1300,7 @@
 				PyObject_REPR(name), 
 				PyBytes_AS_STRING(c->u->u_name), 
 				reftype, arg,
-				PyUnicode_AsString(co->co_name),
+				_PyUnicode_AsString(co->co_name),
 				PyObject_REPR(co->co_freevars));
 			Py_FatalError("compiler_make_closure()");
 		}
diff --git a/Python/errors.c b/Python/errors.c
index 5ee6255..9c9eb2f 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -709,7 +709,7 @@
 			if (moduleName == NULL)
 				PyFile_WriteString("<unknown>", f);
 			else {
-				char* modstr = PyUnicode_AsString(moduleName);
+				char* modstr = _PyUnicode_AsString(moduleName);
 				if (modstr &&
 				    strcmp(modstr, "builtins") != 0)
 				{
diff --git a/Python/future.c b/Python/future.c
index a5bee0c..e775384 100644
--- a/Python/future.c
+++ b/Python/future.c
@@ -20,7 +20,7 @@
 	names = s->v.ImportFrom.names;
 	for (i = 0; i < asdl_seq_LEN(names); i++) {
                 alias_ty name = (alias_ty)asdl_seq_GET(names, i);
-		const char *feature = PyUnicode_AsString(name->name);
+		const char *feature = _PyUnicode_AsString(name->name);
 		if (!feature)
 			return 0;
 		if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
diff --git a/Python/getargs.c b/Python/getargs.c
index ccd1817..36a6261 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -1537,7 +1537,7 @@
 					        "keywords must be strings");
 				return cleanreturn(0, freelist);
 			}
-			ks = PyUnicode_AsString(key);
+			ks = _PyUnicode_AsString(key);
 			for (i = 0; i < len; i++) {
 				if (!strcmp(ks, kwlist[i])) {
 					match = 1;
diff --git a/Python/import.c b/Python/import.c
index a43bd43..bedec1e 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -470,7 +470,7 @@
 			if (value->ob_refcnt != 1)
 				continue;
 			if (PyUnicode_Check(key) && PyModule_Check(value)) {
-				name = PyUnicode_AsString(key);
+				name = _PyUnicode_AsString(key);
 				if (strcmp(name, "builtins") == 0)
 					continue;
 				if (strcmp(name, "sys") == 0)
@@ -489,7 +489,7 @@
 	pos = 0;
 	while (PyDict_Next(modules, &pos, &key, &value)) {
 		if (PyUnicode_Check(key) && PyModule_Check(value)) {
-			name = PyUnicode_AsString(key);
+			name = _PyUnicode_AsString(key);
 			if (strcmp(name, "builtins") == 0)
 				continue;
 			if (strcmp(name, "sys") == 0)
@@ -1296,7 +1296,7 @@
 	if (path != NULL && PyUnicode_Check(path)) {
 		/* The only type of submodule allowed inside a "frozen"
 		   package are other frozen modules or packages. */
-		char *p = PyUnicode_AsString(path);
+		char *p = _PyUnicode_AsString(path);
 		if (strlen(p) + 1 + strlen(name) >= (size_t)buflen) {
 			PyErr_SetString(PyExc_ImportError,
 					"full frozen module name too long");
@@ -2197,7 +2197,7 @@
 					"__package__ set to non-string");
 			return NULL;
 		}
-		pkgname_str = PyUnicode_AsStringAndSize(pkgname, &len);
+		pkgname_str = _PyUnicode_AsStringAndSize(pkgname, &len);
 		if (len == 0) {
 			if (level > 0) {
 				PyErr_SetString(PyExc_ValueError,
@@ -2225,7 +2225,7 @@
 			Py_ssize_t len;
 			int error;
 
-			modname_str = PyUnicode_AsStringAndSize(modname, &len);
+			modname_str = _PyUnicode_AsStringAndSize(modname, &len);
 			if (len > MAXPATHLEN) {
 				PyErr_SetString(PyExc_ValueError,
 						"Module name too long");
@@ -2240,7 +2240,7 @@
 			}
 		} else {
 			/* Normal module, so work out the package name if any */
-			char *start = PyUnicode_AsString(modname);
+			char *start = _PyUnicode_AsString(modname);
 			char *lastdot = strrchr(start, '.');
 			size_t len;
 			int error;
@@ -2635,7 +2635,7 @@
 		if (parent == NULL) {
 			PyErr_Format(PyExc_ImportError,
 			    "reload(): parent %.200s not in sys.modules",
-			     PyUnicode_AsString(parentname));
+			     _PyUnicode_AsString(parentname));
 			Py_DECREF(parentname);
 			imp_modules_reloading_clear();
 			return NULL;
diff --git a/Python/peephole.c b/Python/peephole.c
index 30789e4..b9b26fc 100644
--- a/Python/peephole.c
+++ b/Python/peephole.c
@@ -407,7 +407,7 @@
 			case LOAD_NAME:
 			case LOAD_GLOBAL:
 				j = GETARG(codestr, i);
-				name = PyUnicode_AsString(PyTuple_GET_ITEM(names, j));
+				name = _PyUnicode_AsString(PyTuple_GET_ITEM(names, j));
 				h = load_global(codestr, i, name, consts);
 				if (h < 0)
 					goto exitUnchanged;
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index 2ab1d46..a1777bd 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -803,7 +803,7 @@
 	encoding_attr = PyObject_GetAttrString(std, "encoding");
 	if (encoding_attr != NULL) {
 		const char * encoding;
-		encoding = PyUnicode_AsString(encoding_attr);
+		encoding = _PyUnicode_AsString(encoding_attr);
 		if (encoding != NULL) {
 			_PyCodec_Lookup(encoding);
 		}
@@ -909,7 +909,7 @@
 		oenc = PyObject_GetAttrString(v, "encoding");
 		if (!oenc)
 			return -1;
-		enc = PyUnicode_AsString(oenc);
+		enc = _PyUnicode_AsString(oenc);
 	}
 	v = PySys_GetObject("ps1");
 	if (v != NULL) {
@@ -917,7 +917,7 @@
 		if (v == NULL)
 			PyErr_Clear();
 		else if (PyUnicode_Check(v))
-			ps1 = PyUnicode_AsString(v);
+			ps1 = _PyUnicode_AsString(v);
 	}
 	w = PySys_GetObject("ps2");
 	if (w != NULL) {
@@ -925,7 +925,7 @@
 		if (w == NULL)
 			PyErr_Clear();
 		else if (PyUnicode_Check(w))
-			ps2 = PyUnicode_AsString(w);
+			ps2 = _PyUnicode_AsString(w);
 	}
 	arena = PyArena_New();
 	if (arena == NULL) {
@@ -1101,7 +1101,7 @@
 		goto finally;
 	if (v == Py_None)
 		*filename = NULL;
-	else if (! (*filename = PyUnicode_AsString(v)))
+	else if (! (*filename = _PyUnicode_AsString(v)))
 		goto finally;
 
 	Py_DECREF(v);
@@ -1134,7 +1134,7 @@
 	if (v == Py_None)
 		*text = NULL;
         else if (!PyUnicode_Check(v) ||
-		 !(*text = PyUnicode_AsString(v)))
+		 !(*text = _PyUnicode_AsString(v)))
 		goto finally;
 	Py_DECREF(v);
 	return 1;
@@ -1357,7 +1357,7 @@
 			err = PyFile_WriteString("<unknown>", f);
 		}
 		else {
-			char* modstr = PyUnicode_AsString(moduleName);
+			char* modstr = _PyUnicode_AsString(moduleName);
 			if (modstr && strcmp(modstr, "builtins"))
 			{
 				err = PyFile_WriteString(modstr, f);
@@ -1806,7 +1806,7 @@
 		if (value != NULL) {
 			u = PyObject_Str(value);
 			if (u != NULL) {
-				msg = PyUnicode_AsString(u);
+				msg = _PyUnicode_AsString(u);
 			}
 		}
 		if (msg == NULL)
diff --git a/Python/structmember.c b/Python/structmember.c
index 6c1e932..9f08a6b 100644
--- a/Python/structmember.c
+++ b/Python/structmember.c
@@ -247,7 +247,7 @@
 			PyErr_BadArgument();
 			return -1;
 		}
-		string = PyUnicode_AsStringAndSize(v, &len);
+		string = _PyUnicode_AsStringAndSize(v, &len);
 		if (len != 1) {
 			PyErr_BadArgument();
 			return -1;
diff --git a/Python/symtable.c b/Python/symtable.c
index 0c11ee1..92432ab 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1142,7 +1142,7 @@
 		asdl_seq *seq = s->v.Global.names;
 		for (i = 0; i < asdl_seq_LEN(seq); i++) {
 			identifier name = (identifier)asdl_seq_GET(seq, i);
-			char *c_name = PyUnicode_AsString(name);
+			char *c_name = _PyUnicode_AsString(name);
 			long cur = symtable_lookup(st, name);
 			if (cur < 0)
 				return 0;
@@ -1169,7 +1169,7 @@
 		asdl_seq *seq = s->v.Nonlocal.names;
 		for (i = 0; i < asdl_seq_LEN(seq); i++) {
 			identifier name = (identifier)asdl_seq_GET(seq, i);
-			char *c_name = PyUnicode_AsString(name);
+			char *c_name = _PyUnicode_AsString(name);
 			long cur = symtable_lookup(st, name);
 			if (cur < 0)
 				return 0;
diff --git a/Python/traceback.c b/Python/traceback.c
index d569a18..dffce35 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -257,10 +257,10 @@
 	while (tb != NULL && err == 0) {
 		if (depth <= limit) {
 			err = tb_displayline(f,
-			    PyUnicode_AsString(
+			    _PyUnicode_AsString(
 				    tb->tb_frame->f_code->co_filename),
 			    tb->tb_lineno,
-			    PyUnicode_AsString(tb->tb_frame->f_code->co_name));
+			    _PyUnicode_AsString(tb->tb_frame->f_code->co_name));
 		}
 		depth--;
 		tb = tb->tb_next;