Mercurial > cpython-lru_cache-weakref
comparison Python/future.c @ 42822:302aeee32da8
Use unicode
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Sat, 25 Aug 2007 07:41:59 +0000 |
| parents | cd125fe83051 |
| children | 305d7d2ce047 |
comparison
equal
deleted
inserted
replaced
| 42821:bb288e04b8e5 | 42822:302aeee32da8 |
|---|---|
| 18 assert(s->kind == ImportFrom_kind); | 18 assert(s->kind == ImportFrom_kind); |
| 19 | 19 |
| 20 names = s->v.ImportFrom.names; | 20 names = s->v.ImportFrom.names; |
| 21 for (i = 0; i < asdl_seq_LEN(names); i++) { | 21 for (i = 0; i < asdl_seq_LEN(names); i++) { |
| 22 alias_ty name = (alias_ty)asdl_seq_GET(names, i); | 22 alias_ty name = (alias_ty)asdl_seq_GET(names, i); |
| 23 const char *feature = PyString_AsString(name->name); | 23 const char *feature = PyUnicode_AsString(name->name); |
| 24 if (!feature) | 24 if (!feature) |
| 25 return 0; | 25 return 0; |
| 26 if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) { | 26 if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) { |
| 27 continue; | 27 continue; |
| 28 } else if (strcmp(feature, FUTURE_GENERATORS) == 0) { | 28 } else if (strcmp(feature, FUTURE_GENERATORS) == 0) { |
