]> granicus.if.org Git - python/commitdiff
Don't abbreviate ABS, use long name ABSOLUTE.
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 3 Apr 2006 06:26:32 +0000 (06:26 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 3 Apr 2006 06:26:32 +0000 (06:26 +0000)
Include/code.h
Include/compile.h
Include/pythonrun.h
Lib/__future__.py
Python/compile.c
Python/future.c

index 9e6cb5637e83f24252082d8782c563100b0d182e..ba4c6f8c9805b2ac6cac61ca555ddd7f4fa709d0 100644 (file)
@@ -45,7 +45,7 @@ typedef struct {
 #define CO_GENERATOR_ALLOWED    0x1000
 #endif
 #define CO_FUTURE_DIVISION     0x2000
-#define CO_FUTURE_ABSIMPORT    0x4000 /* absolute import by default */
+#define CO_FUTURE_ABSOLUTE_IMPORT 0x4000 /* do absolute imports by default */
 #define CO_FUTURE_WITH_STATEMENT  0x8000
 
 /* This should be defined if a future statement modifies the syntax.
index 4ac69822a03dbb9bcf853d507538f64013049690..2bde6fb56f6e85cc62fcfbae18e443cf39d88c5b 100644 (file)
@@ -22,7 +22,7 @@ typedef struct {
 #define FUTURE_NESTED_SCOPES "nested_scopes"
 #define FUTURE_GENERATORS "generators"
 #define FUTURE_DIVISION "division"
-#define FUTURE_ABSIMPORT "absolute_import"
+#define FUTURE_ABSOLUTE_IMPORT "absolute_import"
 #define FUTURE_WITH_STATEMENT "with_statement"
 
 struct _mod; /* Declare the existence of this type */
index 1ecb3d71e7dd1c310eb4231861c051bdd7f80404..cfc40e3a20ef5f812be595523fa78f3cf4218812 100644 (file)
@@ -7,7 +7,7 @@
 extern "C" {
 #endif
 
-#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSIMPORT | \
+#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
                    CO_FUTURE_WITH_STATEMENT)
 #define PyCF_MASK_OBSOLETE (CO_NESTED)
 #define PyCF_SOURCE_IS_UTF8  0x0100
index d95ce5f36720b066441343b71324461b5148b9af..79bee2476c13f169e6788a7b59e10524c759a145 100644 (file)
@@ -64,7 +64,7 @@ __all__ = ["all_feature_names"] + all_feature_names
 CO_NESTED            = 0x0010   # nested_scopes
 CO_GENERATOR_ALLOWED = 0        # generators (obsolete, was 0x1000)
 CO_FUTURE_DIVISION   = 0x2000   # division
-CO_FUTURE_ABSIMPORT  = 0x4000   # absolute_import
+CO_FUTURE_ABSOLUTE_IMPORT = 0x4000 # perform absolute imports by default
 CO_FUTURE_WITH_STATEMENT  = 0x8000   # with statement
 
 class _Feature:
index d4fb638b4efa082d5c75c728958c9b38c97262d8..0f7246bf52c7120633229549182c5a92de0fdc17 100644 (file)
@@ -2476,7 +2476,7 @@ compiler_import(struct compiler *c, stmt_ty s)
                int r;
                PyObject *level;
 
-               if (c->c_flags && (c->c_flags->cf_flags & CO_FUTURE_ABSIMPORT))
+               if (c->c_flags && (c->c_flags->cf_flags & CO_FUTURE_ABSOLUTE_IMPORT))
                        level = PyInt_FromLong(0);
                else
                        level = PyInt_FromLong(-1);
@@ -2524,7 +2524,7 @@ compiler_from_import(struct compiler *c, stmt_ty s)
                return 0;
 
        if (s->v.ImportFrom.level == 0 && c->c_flags &&
-           !(c->c_flags->cf_flags & CO_FUTURE_ABSIMPORT))
+           !(c->c_flags->cf_flags & CO_FUTURE_ABSOLUTE_IMPORT))
                level = PyInt_FromLong(-1);
        else
                level = PyInt_FromLong(s->v.ImportFrom.level);
index 4a48ba53e4c9ba206caab081a94eb0896f7b7d57..d22ed3461cff7aa64241f3ab3c7253f0ecb7422d 100644 (file)
@@ -29,8 +29,8 @@ future_check_features(PyFutureFeatures *ff, stmt_ty s, const char *filename)
                        continue;
                } else if (strcmp(feature, FUTURE_DIVISION) == 0) {
                        ff->ff_features |= CO_FUTURE_DIVISION;
-               } else if (strcmp(feature, FUTURE_ABSIMPORT) == 0) {
-                       ff->ff_features |= CO_FUTURE_ABSIMPORT;
+               } else if (strcmp(feature, FUTURE_ABSOLUTE_IMPORT) == 0) {
+                       ff->ff_features |= CO_FUTURE_ABSOLUTE_IMPORT;
                } else if (strcmp(feature, FUTURE_WITH_STATEMENT) == 0) {
                        ff->ff_features |= CO_FUTURE_WITH_STATEMENT;
                } else if (strcmp(feature, "braces") == 0) {