mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Added the const qualifier to char* variables that refer to readonly internal
UTF-8 represenatation of Unicode objects.
This commit is contained in:
parent
a98c4a984b
commit
85b0f5beb1
29 changed files with 60 additions and 61 deletions
|
@ -108,7 +108,7 @@ sys_displayhook_unencodable(PyObject *outf, PyObject *o)
|
|||
{
|
||||
PyObject *stdout_encoding = NULL;
|
||||
PyObject *encoded, *escaped_str, *repr_str, *buffer, *result;
|
||||
char *stdout_encoding_str;
|
||||
const char *stdout_encoding_str;
|
||||
int ret;
|
||||
|
||||
stdout_encoding = _PyObject_GetAttrId(outf, &PyId_encoding);
|
||||
|
@ -2404,7 +2404,7 @@ sys_format(_Py_Identifier *key, FILE *fp, const char *format, va_list va)
|
|||
{
|
||||
PyObject *file, *message;
|
||||
PyObject *error_type, *error_value, *error_traceback;
|
||||
char *utf8;
|
||||
const char *utf8;
|
||||
|
||||
PyErr_Fetch(&error_type, &error_value, &error_traceback);
|
||||
file = _PySys_GetObjectId(key);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue