Use unicode

This commit is contained in:
Neal Norwitz 2007-08-25 07:41:59 +00:00
parent 1978470c3b
commit a369c5aba6
5 changed files with 37 additions and 22 deletions

View file

@ -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) {

View file

@ -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 (;;) {