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
|
@ -154,7 +154,7 @@ PyRun_InteractiveOneObject(FILE *fp, PyObject *filename, PyCompilerFlags *flags)
|
|||
PyObject *m, *d, *v, *w, *oenc = NULL, *mod_name;
|
||||
mod_ty mod;
|
||||
PyArena *arena;
|
||||
char *ps1 = "", *ps2 = "", *enc = NULL;
|
||||
const char *ps1 = "", *ps2 = "", *enc = NULL;
|
||||
int errcode = 0;
|
||||
_Py_IDENTIFIER(encoding);
|
||||
_Py_IDENTIFIER(__main__);
|
||||
|
@ -511,8 +511,8 @@ PyErr_Print(void)
|
|||
static void
|
||||
print_error_text(PyObject *f, int offset, PyObject *text_obj)
|
||||
{
|
||||
char *text;
|
||||
char *nl;
|
||||
const char *text;
|
||||
const char *nl;
|
||||
|
||||
text = PyUnicode_AsUTF8(text_obj);
|
||||
if (text == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue