[Python-checkins] r43572 - in python/trunk: Include/code.h Include/compile.h Include/pythonrun.h Lib/__future__.py Python/compile.c Python/future.c

neal.norwitz python-checkins at python.org
Mon Apr 3 08:26:33 CEST 2006


Author: neal.norwitz
Date: Mon Apr  3 08:26:32 2006
New Revision: 43572

Modified:
   python/trunk/Include/code.h
   python/trunk/Include/compile.h
   python/trunk/Include/pythonrun.h
   python/trunk/Lib/__future__.py
   python/trunk/Python/compile.c
   python/trunk/Python/future.c
Log:
Don't abbreviate ABS, use long name ABSOLUTE.


Modified: python/trunk/Include/code.h
==============================================================================
--- python/trunk/Include/code.h	(original)
+++ python/trunk/Include/code.h	Mon Apr  3 08:26:32 2006
@@ -45,7 +45,7 @@
 #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.

Modified: python/trunk/Include/compile.h
==============================================================================
--- python/trunk/Include/compile.h	(original)
+++ python/trunk/Include/compile.h	Mon Apr  3 08:26:32 2006
@@ -22,7 +22,7 @@
 #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 */

Modified: python/trunk/Include/pythonrun.h
==============================================================================
--- python/trunk/Include/pythonrun.h	(original)
+++ python/trunk/Include/pythonrun.h	Mon Apr  3 08:26:32 2006
@@ -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

Modified: python/trunk/Lib/__future__.py
==============================================================================
--- python/trunk/Lib/__future__.py	(original)
+++ python/trunk/Lib/__future__.py	Mon Apr  3 08:26:32 2006
@@ -64,7 +64,7 @@
 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:

Modified: python/trunk/Python/compile.c
==============================================================================
--- python/trunk/Python/compile.c	(original)
+++ python/trunk/Python/compile.c	Mon Apr  3 08:26:32 2006
@@ -2476,7 +2476,7 @@
 		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 @@
 		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);

Modified: python/trunk/Python/future.c
==============================================================================
--- python/trunk/Python/future.c	(original)
+++ python/trunk/Python/future.c	Mon Apr  3 08:26:32 2006
@@ -29,8 +29,8 @@
 			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) {


More information about the Python-checkins mailing list