|
Compiling without assertions: msg#00010python.pyrex
Hi, this trivial patch allows compiling out all "assert" statements by defining PYREX_WITHOUT_ASSERTIONS in the C compiler (through distutils, a header file, compiler option or whatever). Stefan Index: Pyrex/Compiler/Nodes.py =================================================================== --- Pyrex/Compiler/Nodes.py (Revision 136) +++ Pyrex/Compiler/Nodes.py (Arbeitskopie) @@ -2896,6 +2896,7 @@ #env.recycle_pending_temps() # TEMPORARY def generate_execution_code(self, code): + code.putln("#ifndef PYREX_WITHOUT_ASSERTIONS") self.cond.generate_evaluation_code(code) if self.value: self.value.generate_evaluation_code(code) @@ -2916,6 +2917,7 @@ self.cond.generate_disposal_code(code) if self.value: self.value.generate_disposal_code(code) + code.putln("#endif") class IfStatNode(StatNode): |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | newbie question: 00010, Philip Smith |
|---|---|
| Next by Date: | EasyExtend meets Pyrex: 00010, kay schluehr |
| Previous by Thread: | newbie questioni: 00010, Philip Smith |
| Next by Thread: | EasyExtend meets Pyrex: 00010, kay schluehr |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |