[Cython] [Help]Hacking the cython parser Code

Robert Bradshaw robertwb at math.washington.edu
Sun Mar 15 00:57:07 CET 2009


On Mar 14, 2009, at 12:55 PM, comer c wrote:

> I uncommented this line, and I tried with both these commands.  
> Cython dummy.pyx Cython -v dummy.pyx and it did not generate any  
> verbose output.The output was same as before, without uncommenting  
> that line.
> Am i missing something ?

Look at the .c file. You should see stuff like

                           /*                          ->  
ExprStatNode.generate_execution_code (18, 25) */
                           /*                              ->  
SimpleCallNode.generate_evaluation_code (18, 25) */
                           /*                                  ->  
SimpleCallNode.generate_subexpr_evaluation_code (18, 25) */
                           /*                                      ->  
CoerceToPyTypeNode.generate_evaluation_code (18, 27) */
                           / 
*                                          ->  
CoerceToPyTypeNode.allocate_temp_result (18, 27) */
       /* __pyx_t_1 allocated */
                           / 
*                                          <-  
CoerceToPyTypeNode.allocate_temp_result (18, 27) */
                           / 
*                                          ->  
CoerceToPyTypeNode.generate_result_code (18, 27) */
       __pyx_t_1 = PyInt_FromLong(__pyx_v_n); if (unlikely(! 
__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18;  
__pyx_clineno = __LINE__; goto __pyx_L1_error;}
       __Pyx_GOTREF(__pyx_t_1);
                           / 
*                                          <-  
CoerceToPyTypeNode.generate_result_code (18, 27) */
                           /*                                      <-  
CoerceToPyTypeNode.generate_evaluation_code (18, 27) */
                           /*                                  <-  
SimpleCallNode.generate_subexpr_evaluation_code (18, 25) */
                           /*                                  ->  
SimpleCallNode.allocate_temp_result (18, 25) */
       /* __pyx_t_3 allocated */
                           /*                                  <-  
SimpleCallNode.allocate_temp_result (18, 25) */

- Robert



More information about the Cython-dev mailing list