diff Python/ceval.c @ 48660:85b67fb5672b

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.
author Marc-André Lemburg <mal@egenix.com>
date Thu, 07 Aug 2008 18:54:33 +0000
parents d3d586019aff
children 013d4d8407cb
line wrap: on
line diff
--- a/Python/ceval.c	Thu Aug 07 18:47:28 2008 +0000
+++ b/Python/ceval.c	Thu Aug 07 18:54:33 2008 +0000
@@ -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;