From: Dag Sverre Seljebotn Date: Sat, 27 Jun 2009 13:44:14 +0000 (+0200) Subject: Rename pragma => directive in source X-Git-Tag: 0.12.alpha0~285 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0ee7c0c9c3c763958a32e3d0fd4f4bec6b96745e;p=cython.git Rename pragma => directive in source --- diff --git a/Cython/Compiler/CmdLine.py b/Cython/Compiler/CmdLine.py index d7b2f23a..de431c04 100644 --- a/Cython/Compiler/CmdLine.py +++ b/Cython/Compiler/CmdLine.py @@ -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) diff --git a/Cython/Compiler/Main.py b/Cython/Compiler/Main.py index 6cf17f47..f8bcf151 100644 --- a/Cython/Compiler/Main.py +++ b/Cython/Compiler/Main.py @@ -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":