Rename pragma => directive in source
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sat, 27 Jun 2009 13:44:14 +0000 (15:44 +0200)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sat, 27 Jun 2009 13:44:14 +0000 (15:44 +0200)
Cython/Compiler/CmdLine.py
Cython/Compiler/Main.py

index d7b2f23a04936216a614241369596fdf904c6100..de431c04e557682440065e3ef75075f140839219 100644 (file)
@@ -126,7 +126,7 @@ def parse_command_line(args):
                 options.emit_linenums = True
             elif option in ("-X", "--directive"):
                 try:
-                    options.pragma_overrides = Options.parse_option_list(pop_arg())
+                    options.compiler_directives = Options.parse_option_list(pop_arg())
                 except ValueError, e:
                     sys.stderr.write("Error in compiler directive: %s\n" % e.message)
                     sys.exit(1)
index 6cf17f47792c173f55718cb6a4cdbefad4a55b49..f8bcf1511ab633e8ae689b7ea1c7bc4b56daf6bb 100644 (file)
@@ -60,14 +60,14 @@ class Context(object):
     #  include_directories   [string]
     #  future_directives     [object]
     
-    def __init__(self, include_directories, pragma_overrides):
+    def __init__(self, include_directories, compiler_directives):
         #self.modules = {"__builtin__" : BuiltinScope()}
         import Builtin, CythonScope
         self.modules = {"__builtin__" : Builtin.builtin_scope}
         self.modules["cython"] = CythonScope.create_cython_scope(self)
         self.include_directories = include_directories
         self.future_directives = set()
-        self.pragma_overrides = pragma_overrides
+        self.compiler_directives = compiler_directives
 
         self.pxds = {} # full name -> node tree
 
@@ -113,7 +113,7 @@ class Context(object):
             NormalizeTree(self),
             PostParse(self),
             _specific_post_parse,
-            InterpretCompilerDirectives(self, self.pragma_overrides),
+            InterpretCompilerDirectives(self, self.compiler_directives),
             _align_function_definitions,
             ConstantFolding(),
             FlattenInListTransform(),
@@ -526,7 +526,7 @@ def create_default_resultobj(compilation_source, options):
 
 def run_pipeline(source, options, full_module_name = None):
     # Set up context
-    context = Context(options.include_path, options.pragma_overrides)
+    context = Context(options.include_path, options.compiler_directives)
 
     # Set up source object
     cwd = os.getcwd()
@@ -579,7 +579,7 @@ class CompilationOptions(object):
                                 defaults to true when recursive is true.
     verbose           boolean   Always print source names being compiled
     quiet             boolean   Don't print source names in recursive mode
-    pragma_overrides  dict      Overrides for pragma options (see Options.py)
+    compiler_directives  dict      Overrides for pragma options (see Options.py)
     
     Following options are experimental and only used on MacOSX:
     
@@ -767,7 +767,7 @@ default_options = dict(
     timestamps = None,
     verbose = 0,
     quiet = 0,
-    pragma_overrides = {},
+    compiler_directives = {},
     emit_linenums = False,
 )
 if sys.platform == "mac":