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