cython

annotate Cython/Compiler/Options.py @ 397:b68682070c8e

Add untracked files to repo.
author Robert Bradshaw <robertwb@math.washington.edu>
date Fri Apr 04 00:15:22 2008 -0700 (4 years ago)
parents 6ab55fb47073
children 5450c26066e9

rev   line source
wstein@67 1 #
wstein@67 2 # Pyrex - Compilation-wide options
wstein@67 3 #
wstein@67 4
robertwb@106 5 intern_names = 1 # Intern global variable and attribute names
robertwb@228 6 cache_builtins = 1 # Perform lookups on builtin names only once
wstein@78 7
wstein@78 8 embed_pos_in_docstring = 0
robertwb@125 9 gcc_branch_hints = 1
robertwb@126 10
robertwb@126 11 pre_import = None
barbieri@243 12 docstrings = True
robertwb@151 13
robertwb@151 14 # This is a SAGE-specific option that will
robertwb@151 15 # cause Cython to incref local variables before
robertwb@151 16 # performing a binary operation on them, for
robertwb@151 17 # safe detection of inplace operators.
robertwb@151 18 incref_local_binop = 0
robertwb@151 19
robertwb@229 20 # Decref global variables in this module on exit for garbage collection.
robertwb@229 21 # 0: None, 1+: interned objects, 2+: cdef globals, 3+: types objects
robertwb@253 22 # Mostly for reducing noise for Valgrind, only executes at process exit
robertwb@253 23 # (when all memory will be reclaimed anyways).
robertwb@253 24 generate_cleanup_code = 0
robertwb@247 25
robertwb@253 26 annotate = 0
robertwb@254 27
robertwb@254 28 # This will convert statements of the form "for i in range(...)"
robertwb@254 29 # to "for i from ..." when i is a cdef'd integer type, and the direction
robertwb@254 30 # (i.e. sign of step) can be determined.
robertwb@254 31 # WARNING: This may change the symantics if the range causes assignment to
robertwb@254 32 # i to overflow. Specifically, if this option is set, an error will be
robertwb@254 33 # raised before the loop is entered, wheras without this option the loop
robertwb@254 34 # will execute util a overflowing value is encountered.
robertwb@255 35 convert_range = 0
robertwb@354 36
robertwb@354 37 # Enable this to allow one to write your_module.foo = ... to overwrite the
robertwb@354 38 # definition if the cpdef function foo, at the cost of an extra dictionary
robertwb@354 39 # lookup on every call.
robertwb@354 40 # If this is 0 it simply creates a wrapper.
robertwb@354 41 lookup_module_cpdef = 0
robertwb@375 42
robertwb@375 43 # This will set local variables to None rather than NULL which may cause
robertwb@375 44 # surpress what would be an UnboundLocalError in pure Python but eliminates
robertwb@375 45 # checking for NULL on every use, and can decref rather than xdecref at the end.
robertwb@375 46 # WARNING: This is a work in progress, may currently segfault.
robertwb@375 47 init_local_none = 1
robertwb@381 48
robertwb@381 49 # Optimize no argument and one argument methods by using the METH_O and METH_NOARGS
robertwb@381 50 # calling conventions. These are faster calling conventions, but disallow the use of
robertwb@381 51 # keywords (which, admittedly, are of little use in these cases).
robertwb@381 52 optimize_simple_methods = 1
robertwb@387 53
robertwb@387 54 # Append the c file and line number to the traceback for exceptions.
robertwb@393 55 c_line_in_traceback = 0