comparison Python/future.c @ 35992:c0c12aa757e7 legacy-trunk

Reduce scope of feature
author Neal Norwitz <nnorwitz@gmail.com>
date Tue, 06 Dec 2005 07:26:02 +0000
parents 11ee982f8c8d
children 5c36c222e7ca
comparison
equal deleted inserted replaced
35991:11ee982f8c8d 35992:c0c12aa757e7
11 11
12 static int 12 static int
13 future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename) 13 future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
14 { 14 {
15 int i; 15 int i;
16 const char *feature;
17 asdl_seq *names; 16 asdl_seq *names;
18 17
19 assert(s->kind == ImportFrom_kind); 18 assert(s->kind == ImportFrom_kind);
20 19
21 names = s->v.ImportFrom.names; 20 names = s->v.ImportFrom.names;
22 for (i = 0; i < asdl_seq_LEN(names); i++) { 21 for (i = 0; i < asdl_seq_LEN(names); i++) {
23 alias_ty name = asdl_seq_GET(names, i); 22 alias_ty name = asdl_seq_GET(names, i);
24 feature = PyString_AsString(name->name); 23 const char *feature = PyString_AsString(name->name);
25 if (!feature) 24 if (!feature)
26 return 0; 25 return 0;
27 if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) { 26 if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
28 continue; 27 continue;
29 } else if (strcmp(feature, FUTURE_GENERATORS) == 0) { 28 } else if (strcmp(feature, FUTURE_GENERATORS) == 0) {