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.
This commit is contained in:
Marc-André Lemburg 2008-08-07 18:54:33 +00:00
parent 28bd1a3bd5
commit 4cc0f24857
60 changed files with 156 additions and 137 deletions

View file

@ -859,7 +859,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
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 @@ PyEval_GetFuncName(PyObject *func)
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 @@ update_keyword_args(PyObject *orig_kwdict, int nk, PyObject ***pp_stack,
"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 @@ format_exc_check_arg(PyObject *exc, const char *format_str, PyObject *obj)
if (!obj)
return;
obj_str = PyUnicode_AsString(obj);
obj_str = _PyUnicode_AsString(obj);
if (!obj_str)
return;