From cbce280d4f3f1c4d86a989ab85c93f13ec7e00f9 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 3 Apr 2006 06:26:32 +0000 Subject: Don't abbreviate ABS, use long name ABSOLUTE. --- Include/code.h | 2 +- Include/compile.h | 2 +- Include/pythonrun.h | 2 +- Lib/__future__.py | 2 +- Python/compile.c | 4 ++-- Python/future.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Include/code.h b/Include/code.h index 9e6cb56..ba4c6f8 100644 --- a/Include/code.h +++ b/Include/code.h @@ -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. diff --git a/Include/compile.h b/Include/compile.h index 4ac6982..2bde6fb 100644 --- a/Include/compile.h +++ b/Include/compile.h @@ -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 */ diff --git a/Include/pythonrun.h b/Include/pythonrun.h index 1ecb3d7..cfc40e3 100644 --- a/Include/pythonrun.h +++ b/Include/pythonrun.h @@ -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 diff --git a/Lib/__future__.py b/Lib/__future__.py index d95ce5f..79bee24 100644 --- a/Lib/__future__.py +++ b/Lib/__future__.py @@ -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: diff --git a/Python/compile.c b/Python/compile.c index d4fb638..0f7246b 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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); diff --git a/Python/future.c b/Python/future.c index 4a48ba5..d22ed34 100644 --- a/Python/future.c +++ b/Python/future.c @@ -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) { -- cgit v0.12