summaryrefslogtreecommitdiffstats
path: root/Python/pythonrun.c
diff options
context:
space:
mode:
authorMarc-André Lemburg <mal@egenix.com>2008-08-07 18:54:33 (GMT)
committerMarc-André Lemburg <mal@egenix.com>2008-08-07 18:54:33 (GMT)
commit4cc0f24857c345ba99691b2ae6829c6ce3c0edcd (patch)
treecb4d437c9acb08f213376a499542f2e3bf81b8ad /Python/pythonrun.c
parent28bd1a3bd5cf7f8c161bddb1735c4968fb9f6a8f (diff)
downloadcpython-4cc0f24857c345ba99691b2ae6829c6ce3c0edcd.zip
cpython-4cc0f24857c345ba99691b2ae6829c6ce3c0edcd.tar.gz
cpython-4cc0f24857c345ba99691b2ae6829c6ce3c0edcd.tar.bz2
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.
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r--Python/pythonrun.c16
1 files changed, 8 insertions, 8 deletions
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 @@ initstdio(void)
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 @@ PyRun_InteractiveOneFlags(FILE *fp, const char *filename, PyCompilerFlags *flags
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 @@ PyRun_InteractiveOneFlags(FILE *fp, const char *filename, PyCompilerFlags *flags
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 @@ PyRun_InteractiveOneFlags(FILE *fp, const char *filename, PyCompilerFlags *flags
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 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename,
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 @@ parse_syntax_error(PyObject *err, PyObject **message, const char **filename,
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 @@ print_exception(PyObject *f, PyObject *value)
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 @@ err_input(perrdetail *err)
if (value != NULL) {
u = PyObject_Str(value);
if (u != NULL) {
- msg = PyUnicode_AsString(u);
+ msg = _PyUnicode_AsString(u);
}
}
if (msg == NULL)