mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Use unicode
This commit is contained in:
parent
1978470c3b
commit
a369c5aba6
5 changed files with 37 additions and 22 deletions
|
@ -20,7 +20,7 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
|
|||
names = s->v.ImportFrom.names;
|
||||
for (i = 0; i < asdl_seq_LEN(names); i++) {
|
||||
alias_ty name = (alias_ty)asdl_seq_GET(names, i);
|
||||
const char *feature = PyString_AsString(name->name);
|
||||
const char *feature = PyUnicode_AsString(name->name);
|
||||
if (!feature)
|
||||
return 0;
|
||||
if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
|
||||
|
|
|
@ -707,12 +707,12 @@ PyRun_InteractiveLoopFlags(FILE *fp, const char *filename, PyCompilerFlags *flag
|
|||
}
|
||||
v = PySys_GetObject("ps1");
|
||||
if (v == NULL) {
|
||||
PySys_SetObject("ps1", v = PyString_FromString(">>> "));
|
||||
PySys_SetObject("ps1", v = PyUnicode_FromString(">>> "));
|
||||
Py_XDECREF(v);
|
||||
}
|
||||
v = PySys_GetObject("ps2");
|
||||
if (v == NULL) {
|
||||
PySys_SetObject("ps2", v = PyString_FromString("... "));
|
||||
PySys_SetObject("ps2", v = PyUnicode_FromString("... "));
|
||||
Py_XDECREF(v);
|
||||
}
|
||||
for (;;) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue